public static function ImageWidgetHelper::alter in Lightning Media 8.4
Same name and namespace in other branches
- 8 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::alter()
- 8.2 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::alter()
- 8.3 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::alter()
Alters an image widget form element.
Parameters
array $element: The widget form element.
\Drupal\image\Plugin\Field\FieldWidget\ImageWidget $widget: The widget plugin.
1 call to ImageWidgetHelper::alter()
File
- src/
ImageWidgetHelper.php, line 94
Class
- ImageWidgetHelper
- Contains helper functions for manipulating image field widgets.
Namespace
Drupal\lightning_mediaCode
public static function alter(array &$element, ImageWidget $widget) {
// Store the widget settings where process() can see them.
$element['#settings'] = static::getSettings($widget);
$element['#process'][] = [
static::class,
'process',
];
}