You are here

public function ImageEffectBase::setConfiguration in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/ImageEffectBase.php \Drupal\image\ImageEffectBase::setConfiguration()
  2. 9 core/modules/image/src/ImageEffectBase.php \Drupal\image\ImageEffectBase::setConfiguration()

File

core/modules/image/src/ImageEffectBase.php, line 142

Class

ImageEffectBase
Provides a base class for image effects.

Namespace

Drupal\image

Code

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;
}