public function ImageAPIOptimizeProcessorBase::setConfiguration in Image Optimize (or ImageAPI Optimize) 4.x
Same name and namespace in other branches
- 8.3 src/ImageAPIOptimizeProcessorBase.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorBase::setConfiguration()
- 8.2 src/ImageAPIOptimizeProcessorBase.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorBase::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 ImageAPIOptimizeProcessorBase::setConfiguration()
- ImageAPIOptimizeProcessorBase::__construct in src/
ImageAPIOptimizeProcessorBase.php - Constructs a \Drupal\Component\Plugin\PluginBase object.
File
- src/
ImageAPIOptimizeProcessorBase.php, line 133
Class
- ImageAPIOptimizeProcessorBase
- Provides a base class for image optimize processors.
Namespace
Drupal\imageapi_optimizeCode
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;
}