public function VideoEmbedPlayerFormatter::settingsSummary in Video 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/VideoEmbedPlayerFormatter.php \Drupal\video\Plugin\Field\FieldFormatter\VideoEmbedPlayerFormatter::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/ VideoEmbedPlayerFormatter.php, line 99
Class
- VideoEmbedPlayerFormatter
- Plugin implementation of the video field formatter.
Namespace
Drupal\video\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary[] = t('Embedded Video (@widthx@height@autoplay@related_videos).', [
'@width' => $this
->getSetting('width'),
'@height' => $this
->getSetting('height'),
'@related_videos' => $this
->getSetting('related_videos') ? t(', showing related videos') : '',
'@autoplay' => $this
->getSetting('autoplay') ? t(', autoplaying') : '',
]);
return $summary;
}