public function FileAudioFormatter::settingsSummary in File Entity (fieldable files) 8.2
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/ FileAudioFormatter.php, line 124
Class
- FileAudioFormatter
- Plugin implementation of the 'file_audio' formatter.
Namespace
Drupal\file_entity\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = array();
$summary[] = t('Controls: %controls', array(
'%controls' => $this
->getSetting('controls') ? 'visible' : 'hidden',
));
$summary[] = t('Autoplay: %autoplay', array(
'%autoplay' => $this
->getSetting('autoplay') ? t('yes') : t('no'),
));
$summary[] = t('Loop: %loop', array(
'%loop' => $this
->getSetting('loop') ? t('yes') : t('no'),
));
$summary[] = t('Multiple files: %multiple', array(
'%multiple' => $this
->getSetting('multiple_file_behavior'),
));
return $summary;
}