public function ArrayPluginDefinitionDecorator::__construct in Plugin 8.2
Constructs a new instance.
Parameters
array $array_definition: The array definition.
File
- src/
PluginDefinition/ ArrayPluginDefinitionDecorator.php, line 30
Class
- ArrayPluginDefinitionDecorator
- Provides a plugin definition based on an array.
Namespace
Drupal\plugin\PluginDefinitionCode
public function __construct(array $array_definition = []) {
if (isset($array_definition['class'])) {
PluginDefinitionValidator::validateClass($array_definition['class']);
}
if (isset($array_definition['deriver'])) {
PluginDefinitionValidator::validateDeriverClass($array_definition['deriver']);
}
if (isset($array_definition['context'])) {
PluginDefinitionValidator::validateContextDefinitions($array_definition['context']);
}
$this->arrayDefinition = $array_definition;
}