You are here

public function TamperPluginBase::setConfiguration in Tamper 7

Sets the configuration for this plugin instance.

Parameters

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

Overrides TamperPluginInterface::setConfiguration

2 calls to TamperPluginBase::setConfiguration()
TamperPluginBase::submitConfigurationForm in src/Tamper.php
Form submission handler.
TamperPluginBase::__construct in src/Tamper.php
Constructs a TamperPluginBase object.

File

src/Tamper.php, line 308
Contains TamperPluginBase.

Class

TamperPluginBase
Base class for Tamper plugins.

Code

public function setConfiguration(array $configuration) {
  $defaults = $this
    ->defaultConfiguration();
  $this->configuration = array_intersect_key($configuration, $defaults) + $defaults;
}