You are here

public function TamperPluginBase::__construct in Tamper 7

Constructs a TamperPluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin id for the plugin instance.

TamperPluginDefinition $plugin_definition: The plugin implementation definition.

File

src/Tamper.php, line 269
Contains TamperPluginBase.

Class

TamperPluginBase
Base class for Tamper plugins.

Code

public function __construct(array $configuration, $plugin_id, TamperPluginDefinition $plugin_definition) {
  $this->pluginId = $plugin_id;
  $this->pluginDefinition = $plugin_definition;

  // Calling setConfiguration() ensures the configuration is clean and
  // defaults are set.
  $this
    ->setConfiguration($configuration);
}