You are here

public function TamperBase::setConfiguration in Tamper 8

Sets the configuration for this plugin instance.

Parameters

array $configuration: An associative array containing the plugin's configuration.

Overrides ConfigurableInterface::setConfiguration

23 calls to TamperBase::setConfiguration()
ConvertBoolean::submitConfigurationForm in src/Plugin/Tamper/ConvertBoolean.php
Form submission handler.
ConvertCase::submitConfigurationForm in src/Plugin/Tamper/ConvertCase.php
Form submission handler.
Copy::submitConfigurationForm in src/Plugin/Tamper/Copy.php
Form submission handler.
DefaultValue::submitConfigurationForm in src/Plugin/Tamper/DefaultValue.php
Form submission handler.
Encode::submitConfigurationForm in src/Plugin/Tamper/Encode.php
Form submission handler.

... See full list

File

src/TamperBase.php, line 64

Class

TamperBase
Provides a base class to tamper data from.

Namespace

Drupal\tamper

Code

public function setConfiguration(array $configuration) {

  // Ignore source definition from configuration as that shouldn't be stored
  // on config files.
  unset($configuration['source_definition']);

  // Merge with default configuration.
  $this->configuration = NestedArray::mergeDeep($this
    ->defaultConfiguration(), $configuration);
}