public function FieldCollectionTabsFormatter::settingsSummary in Field Collection Tab formatter 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/ FieldCollectionTabsFormatter.php, line 132
Class
- FieldCollectionTabsFormatter
- Plugin implementation of the 'tabs' formatter.
Namespace
Drupal\field_collection_tabs\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
// Implement settings summary.
$summary[] = $this
->getSetting('title_field') ? $this
->t('Title field: ' . $this
->getSetting('title_field')) : $this
->t('Numbered Tabs');
$summary[] = $this
->getsetting('view_mode') ? $this
->t('View Mode: ' . $this
->getSetting('view_mode')) : $this
->t('View Mode: Full');
return $summary;
}