public function oEmbedLinkFormatter::settingsSummary in oEmbed 8
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/ oEmbedLinkFormatter.php, line 94 - Contains \Drupal\oembed\Plugin\Field\FieldFormatter\oEmbedLinkFormatter.
Class
- oEmbedLinkFormatter
- Plugin implementation of the 'oembed_link' formatter.
Namespace
Drupal\oembed\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
if ($maxwidth = $this
->getSetting('maxwidth')) {
$summary[] = $this
->t('Max Width: @maxwidth', array(
'@maxwidth' => $maxwidth,
));
}
if ($maxheight = $this
->getSetting('maxheight')) {
$summary[] = $this
->t('Max Height: @maxheight', array(
'@maxheight' => $maxheight,
));
}
return $summary;
}