public function FaqFieldAnchorListFormatter::settingsSummary in FAQ Field 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Field/FieldFormatter/FaqFieldAnchorListFormatter.php \Drupal\faqfield\Plugin\Field\FieldFormatter\FaqFieldAnchorListFormatter::settingsSummary()
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/ FaqFieldAnchorListFormatter.php, line 54
Class
- FaqFieldAnchorListFormatter
- Plugin implementation of the 'faqfield_anchor_list' formatter.
Namespace
Drupal\faqfield\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
if ($this
->getSetting('anchor_list_type') == 'ul') {
$summary[] = $this
->t('Bullet list');
}
else {
$summary[] = $this
->t('Numeric list');
}
return $summary;
}