public function ImageEffectBase::setConfiguration in Drupal 8
Same name and namespace in other branches
- 9 core/modules/image/src/ImageEffectBase.php \Drupal\image\ImageEffectBase::setConfiguration()
Sets the configuration for this plugin instance.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Overrides ConfigurableInterface::setConfiguration
1 call to ImageEffectBase::setConfiguration()
- ImageEffectBase::__construct in core/
modules/ image/ src/ ImageEffectBase.php - Constructs a \Drupal\Component\Plugin\PluginBase object.
File
- core/
modules/ image/ src/ ImageEffectBase.php, line 142
Class
- ImageEffectBase
- Provides a base class for image effects.
Namespace
Drupal\imageCode
public function setConfiguration(array $configuration) {
$configuration += [
'data' => [],
'uuid' => '',
'weight' => '',
];
$this->configuration = $configuration['data'] + $this
->defaultConfiguration();
$this->uuid = $configuration['uuid'];
$this->weight = $configuration['weight'];
return $this;
}