protected function ImageEffectAddForm::prepareImageEffect in Drupal 9
Same name and namespace in other branches
- 8 core/modules/image/src/Form/ImageEffectAddForm.php \Drupal\image\Form\ImageEffectAddForm::prepareImageEffect()
Converts an image effect ID into an object.
Parameters
string $image_effect: The image effect ID.
Return value
\Drupal\image\ImageEffectInterface The image effect object.
Overrides ImageEffectFormBase::prepareImageEffect
File
- core/
modules/ image/ src/ Form/ ImageEffectAddForm.php, line 58
Class
- ImageEffectAddForm
- Provides an add form for image effects.
Namespace
Drupal\image\FormCode
protected function prepareImageEffect($image_effect) {
$image_effect = $this->effectManager
->createInstance($image_effect);
// Set the initial weight so this effect comes last.
$image_effect
->setWeight(count($this->imageStyle
->getEffects()));
return $image_effect;
}