public function FileVideoFormatter::settingsSummary in Drupal 9
Same name and namespace in other branches
- 8 core/modules/file/src/Plugin/Field/FieldFormatter/FileVideoFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileVideoFormatter::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 FileMediaFormatterBase::settingsSummary
File
- core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileVideoFormatter.php, line 75
Class
- FileVideoFormatter
- Plugin implementation of the 'file_video' formatter.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$summary[] = $this
->t('Muted: %muted', [
'%muted' => $this
->getSetting('muted') ? $this
->t('yes') : $this
->t('no'),
]);
$summary[] = $this
->t('Size: %width x %height pixels', [
'%width' => $this
->getSetting('width'),
'%height' => $this
->getSetting('height'),
]);
return $summary;
}