public function ButtonFieldImage::settingsSummary in Button Field 8
Same name in this branch
- 8 src/Plugin/Field/FieldFormatter/ButtonFieldImage.php \Drupal\button_field\Plugin\Field\FieldFormatter\ButtonFieldImage::settingsSummary()
- 8 src/Plugin/Field/FieldWidget/ButtonFieldImage.php \Drupal\button_field\Plugin\Field\FieldWidget\ButtonFieldImage::settingsSummary()
Returns a short summary for the current widget settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.
Return value
array A short summary of the widget settings.
Overrides WidgetBase::settingsSummary
File
- src/
Plugin/ Field/ FieldWidget/ ButtonFieldImage.php, line 69 - Contains Drupal\button_field\Plugin\Field\FieldWidget\ButtonFieldImage.
Class
- ButtonFieldImage
- Plugin implementation of the 'button html' widget.
Namespace
Drupal\button_field\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = array();
$summary[] = t('Image path: !path', array(
'!path' => $this
->getSetting('image_path'),
));
$summary[] = t('Alt text: !text', array(
'!text' => $this
->getSetting('alt_text') ?: $this->fieldDefinition
->getLabel(),
));
$summary[] = t('Title text: !text', array(
'!text' => $this
->getSetting('title_text'),
));
return $summary;
}