public function JssorFieldFormatter::settingsSummary in Jssor Slider 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/ JssorFieldFormatter.php, line 194 - Contains \Drupal\jssor\Plugin\Field\FieldFormatter\JssorFieldFormatter.
Class
- JssorFieldFormatter
- Plugin for responsive image formatter.
Namespace
Drupal\jssor\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$settings = $this
->getSettings();
$summary = [];
$image_style = $this->imageStyleStorage
->load($settings['image_style']);
if ($image_style) {
$summary[] = t('Image style: @image_style', array(
'@image_style' => $image_style
->label(),
));
}
if ($this
->getSetting('arrownavigator')) {
$summary[] = t('Arrow navigator');
}
if ($this
->getSetting('bulletnavigator')) {
$summary[] = t('Bullet navigator');
}
if ($this
->getSetting('caption')) {
$summary[] = t('Caption');
}
$summary[] = t('Autoplay : @autoplay', array(
'@autoplay' => $settings['autoplay'],
));
$summary[] = t('Autoplay interval : @autoplayinterval', array(
'@autoplayinterval' => $settings['autoplayinterval'],
));
return $summary;
}