protected static function ImageWidgetHelper::getSettings in Lightning Media 8.4
Same name and namespace in other branches
- 8 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettings()
- 8.2 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettings()
- 8.3 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettings()
Returns normalized Lightning Media-specific settings for the widget.
Parameters
\Drupal\image\Plugin\Field\FieldWidget\ImageWidget $widget: The widget plugin.
Return value
array The normalized settings.
3 calls to ImageWidgetHelper::getSettings()
- ImageWidgetHelper::alter in src/
ImageWidgetHelper.php - Alters an image widget form element.
- ImageWidgetHelper::getSettingsForm in src/
ImageWidgetHelper.php - Returns the form for an image widget's Lightning Media-specific settings.
- ImageWidgetHelper::summarize in src/
ImageWidgetHelper.php - Summarizes an image widget's Lightning Media-specific settings.
File
- src/
ImageWidgetHelper.php, line 21
Class
- ImageWidgetHelper
- Contains helper functions for manipulating image field widgets.
Namespace
Drupal\lightning_mediaCode
protected static function getSettings(ImageWidget $widget) {
$settings = $widget
->getThirdPartySettings('lightning_media') ?: [];
$settings += [
'file_links' => TRUE,
'remove_button' => TRUE,
];
return $settings;
}