function DuplicateConfigAction::apply

Same name and namespace in other branches
  1. 11.x core/modules/config/tests/config_action_duplicate_test/src/Plugin/ConfigAction/DuplicateConfigAction.php \Drupal\config_action_duplicate_test\Plugin\ConfigAction\DuplicateConfigAction::apply()

Applies the config action.

Parameters

string $configName: The name of the config to apply the action to.

mixed $value: The value for the action to use.

Overrides ConfigActionPluginInterface::apply

File

core/modules/config/tests/config_action_duplicate_test/src/Plugin/ConfigAction/DuplicateConfigAction.php, line 19

Class

DuplicateConfigAction
#[ConfigAction(id: 'config_action_duplicate_test:config_test.dynamic:setProtectedProperty', admin_label: new TranslatableMarkup('A duplicate config action'), entity_types: [ 'config_test', ])]

Namespace

Drupal\config_action_duplicate_test\Plugin\ConfigAction

Code

public function apply(string $configName, mixed $value) : void {
  // This method should never be called.
  throw new \BadMethodCallException();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.