public function Details::settingsSummary in Field Group 8
Same name and namespace in other branches
- 8.3 src/Plugin/field_group/FieldGroupFormatter/Details.php \Drupal\field_group\Plugin\field_group\FieldGroupFormatter\Details::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
array() A short summary of the formatter settings.
Overrides FieldGroupFormatterBase::settingsSummary
File
- src/
Plugin/ field_group/ FieldGroupFormatter/ Details.php, line 85
Class
- Details
- Details element.
Namespace
Drupal\field_group\Plugin\field_group\FieldGroupFormatterCode
public function settingsSummary() {
$summary = array();
if ($this
->getSetting('open')) {
$summary[] = $this
->t('Default state open');
}
else {
$summary[] = $this
->t('Default state closed');
}
if ($this
->getSetting('required_fields')) {
$summary[] = $this
->t('Mark as required');
}
return $summary;
}