public function ButtonFieldHtml::settingsSummary in Button Field 8
Same name in this branch
- 8 src/Plugin/Field/FieldFormatter/ButtonFieldHtml.php \Drupal\button_field\Plugin\Field\FieldFormatter\ButtonFieldHtml::settingsSummary()
- 8 src/Plugin/Field/FieldWidget/ButtonFieldHtml.php \Drupal\button_field\Plugin\Field\FieldWidget\ButtonFieldHtml::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/ ButtonFieldHtml.php, line 51 - Contains \Drupal\button_field\Plugin\field\formatter\ButtonFieldHtml.
Class
- ButtonFieldHtml
- Plugin implementation of the 'html button' field formatter.
Namespace
Drupal\button_field\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = array();
$summary[] = t('Button title: !text', array(
'!text' => $this
->getSetting('text') ?: $this->fieldDefinition
->getLabel(),
));
return $summary;
}