public static function ImageWidgetHelper::getSettingsForm in Lightning Media 8.2
Same name and namespace in other branches
- 8.4 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettingsForm()
- 8 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettingsForm()
- 8.3 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::getSettingsForm()
Returns the form for an image widget's Lightning Media-specific settings.
Parameters
\Drupal\image\Plugin\Field\FieldWidget\ImageWidget $widget: The widget plugin.
Return value
array The settings form elements.
1 call to ImageWidgetHelper::getSettingsForm()
File
- src/
ImageWidgetHelper.php, line 41
Class
- ImageWidgetHelper
- Contains helper functions for manipulating image field widgets.
Namespace
Drupal\lightning_mediaCode
public static function getSettingsForm(ImageWidget $widget) {
$settings = static::getSettings($widget);
return [
'file_links' => [
'#type' => 'checkbox',
'#title' => t('Show links to uploaded files'),
'#default_value' => $settings['file_links'],
],
'remove_button' => [
'#type' => 'checkbox',
'#title' => t('Show Remove button'),
'#default_value' => $settings['remove_button'],
],
];
}