public function BootstrapBasicImageGalleryFormatter::settingsSummary in Bootstrap Basic Image Gallery 8
Returns a short summary for the current formatter settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.
Return value
string[] A short summary of the formatter settings.
Overrides FormatterBase::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ BootstrapBasicImageGalleryFormatter.php, line 254
Class
- BootstrapBasicImageGalleryFormatter
- Plugin implementation of the 'BootstrapBasicImageGalleryFormatter' formatter.
Namespace
Drupal\bootstrap_basic_image_gallery\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary[] = $this
->t('Image Style: <strong>@settingValue</strong>', [
'@settingValue' => empty($this
->getSetting('image_style')) ? 'Original Image' : $this
->getSetting('image_style'),
]);
$summary[] = $this
->t('Thumbnails Per Row: <strong>@settingValue</strong>', [
'@settingValue' => $this
->getSetting('thumbnails_per_row'),
]);
$summary[] = $this
->t('Thumbnail Image Style: <strong>@settingValue</strong>', [
'@settingValue' => empty($this
->getSetting('thumbnail_image_style')) ? 'Original Image' : $this
->getSetting('thumbnail_image_style'),
]);
$summary[] = $this
->t('Modal Image Style: <strong>@settingValue</strong>', [
'@settingValue' => empty($this
->getSetting('modal_image_style')) ? 'Original Image' : $this
->getSetting('modal_image_style'),
]);
$summary[] = $this
->t('Autorotate Carousel? <strong>@settingValue</strong>', [
'@settingValue' => $this
->getSetting('carousel_autorotate') ? 'Yes' : 'No',
]);
if ($this
->getSetting('carousel_autorotate')) {
$summary[] = $this
->t('Autorotate Carousel Interval <strong>@settingValue</strong>', [
'@settingValue' => empty($this
->getSetting('carousel_interval')) ? 5000 : $this
->getSetting('carousel_interval'),
]);
}
$summary[] = $this
->t('Lazy Load Images? <strong>@settingValue</strong>', [
'@settingValue' => $this
->getSetting('lazyload') ? 'Yes' : 'No',
]);
return $summary;
}