protected function ImageStyleEditForm::updateEffectWeights in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/src/Form/ImageStyleEditForm.php \Drupal\image\Form\ImageStyleEditForm::updateEffectWeights()
- 9 core/modules/image/src/Form/ImageStyleEditForm.php \Drupal\image\Form\ImageStyleEditForm::updateEffectWeights()
Updates image effect weights.
Parameters
array $effects: Associative array with effects having effect uuid as keys and array with effect data as values.
File
- core/
modules/ image/ src/ Form/ ImageStyleEditForm.php, line 267
Class
- ImageStyleEditForm
- Controller for image style edit form.
Namespace
Drupal\image\FormCode
protected function updateEffectWeights(array $effects) {
foreach ($effects as $uuid => $effect_data) {
if ($this->entity
->getEffects()
->has($uuid)) {
$this->entity
->getEffect($uuid)
->setWeight($effect_data['weight']);
}
}
}