public function IframeWidgetBase::settingsSummary in Iframe 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/IframeWidgetBase.php \Drupal\iframe\Plugin\Field\FieldWidget\IframeWidgetBase::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/ IframeWidgetBase.php, line 161
Class
- IframeWidgetBase
- Plugin implementation base functions.
Namespace
Drupal\iframe\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$field_settings = $this
->getFieldSettings();
$settings = $this
->getSettings() + $field_settings;
/* summary on the "manage display" page, valid for one content type */
$summary = [];
$summary[] = $this
->t('Iframe default width: @width', [
'@width' => $settings['width'],
]);
$summary[] = $this
->t('Iframe default height: @height', [
'@height' => $settings['height'],
]);
$summary[] = $this
->t('Iframe default frameborder: @frameborder', [
'@frameborder' => $settings['frameborder'],
]);
$summary[] = $this
->t('Iframe default scrolling: @scrolling', [
'@scrolling' => $settings['scrolling'],
]);
return $summary;
}