You are here

public function ImageEffectBase::setConfiguration in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 ConfigurablePluginInterface::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 147
Contains \Drupal\image\ImageEffectBase.

Class

ImageEffectBase
Provides a base class for image effects.

Namespace

Drupal\image

Code

public function setConfiguration(array $configuration) {
  $configuration += array(
    'data' => array(),
    'uuid' => '',
    'weight' => '',
  );
  $this->configuration = $configuration['data'] + $this
    ->defaultConfiguration();
  $this->uuid = $configuration['uuid'];
  $this->weight = $configuration['weight'];
  return $this;
}