public static function ImageWidgetHelper::summarize in Lightning Media 8.2
Same name and namespace in other branches
- 8.4 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::summarize()
- 8 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::summarize()
- 8.3 src/ImageWidgetHelper.php \Drupal\lightning_media\ImageWidgetHelper::summarize()
Summarizes an image widget's Lightning Media-specific settings.
Parameters
\Drupal\image\Plugin\Field\FieldWidget\ImageWidget $widget: The widget plugin.
array $summary: (optional) An existing summary to augment.
Return value
string[] The summarized settings.
1 call to ImageWidgetHelper::summarize()
File
- src/
ImageWidgetHelper.php, line 69
Class
- ImageWidgetHelper
- Contains helper functions for manipulating image field widgets.
Namespace
Drupal\lightning_mediaCode
public static function summarize(ImageWidget $widget, array &$summary = NULL) {
$settings = static::getSettings($widget);
if (is_null($summary)) {
$summary = [];
}
if (empty($settings['file_links'])) {
$summary[] = t('Do not link to uploaded files');
}
if (empty($settings['remove_button'])) {
$summary[] = t('Hide Remove button');
}
return $summary;
}