protected function ImageStyleEditForm::updateEffectWeights in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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.
1 call to ImageStyleEditForm::updateEffectWeights()
- ImageStyleEditForm::submitForm in core/
modules/ image/ src/ Form/ ImageStyleEditForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
File
- core/
modules/ image/ src/ Form/ ImageStyleEditForm.php, line 279 - Contains \Drupal\image\Form\ImageStyleEditForm.
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']);
}
}
}