public function HtmlElement::settingsSummary in Field Group 8
Same name and namespace in other branches
- 8.3 src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php \Drupal\field_group\Plugin\field_group\FieldGroupFormatter\HtmlElement::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/ HtmlElement.php, line 173
Class
- HtmlElement
- Plugin implementation of the 'html_element' formatter.
Namespace
Drupal\field_group\Plugin\field_group\FieldGroupFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$summary[] = $this
->t('Element: @element', array(
'@element' => $this
->getSetting('element'),
));
if ($this
->getSetting('show_label')) {
$summary[] = $this
->t('Label element: @element', array(
'@element' => $this
->getSetting('label_element'),
));
}
if ($this
->getSetting('attributes')) {
$summary[] = $this
->t('Attributes: @attributes', array(
'@attributes' => $this
->getSetting('attributes'),
));
}
if ($this
->getSetting('required_fields')) {
$summary[] = $this
->t('Mark as required');
}
return $summary;
}