function FileMediaFormatterBase::settingsSummary
Same name in other branches
- 9 core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase::settingsSummary()
- 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase::settingsSummary()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase::settingsSummary()
Overrides FormatterBase::settingsSummary
1 method overrides FileMediaFormatterBase::settingsSummary()
- FileVideoFormatter::settingsSummary in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileVideoFormatter.php - Returns a short summary for the current formatter settings.
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileMediaFormatterBase.php, line 94
Class
- FileMediaFormatterBase
- Base class for media file formatter.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
$summary[] = $this->t('Playback controls: %controls', [
'%controls' => $this->getSetting('controls') ? $this->t('visible') : $this->t('hidden'),
]);
$summary[] = $this->t('Autoplay: %autoplay', [
'%autoplay' => $this->getSetting('autoplay') ? $this->t('yes') : $this->t('no'),
]);
$summary[] = $this->t('Loop: %loop', [
'%loop' => $this->getSetting('loop') ? $this->t('yes') : $this->t('no'),
]);
switch ($this->getSetting('multiple_file_display_type')) {
case 'tags':
$summary[] = $this->t('Multiple file display: Multiple HTML tags');
break;
case 'sources':
$summary[] = $this->t('Multiple file display: One HTML tag with multiple sources');
break;
}
return $summary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.