You are here

public function AudioStreamHTML5::settingsSummary in Media entity audio 8.3

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/AudioStreamHTML5.php, line 48

Class

AudioStreamHTML5
Plugin implementation of the 'Audio Stream (HTML5)' formatter.

Namespace

Drupal\media_entity_audio\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  if ($this
    ->getSetting('controls')) {
    $summary[] = $this
      ->t('Audio controls displayed.');
  }
  else {
    $summary[] = $this
      ->t('Audio controls not displayed.');
  }
  return $summary;
}