public function VideoFormatter::settingsSummary in Facebook Instant Articles 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldFormatter/VideoFormatter.php \Drupal\fb_instant_articles\Plugin\Field\FieldFormatter\VideoFormatter::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 DescriptionAwareFileFormatterBase::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ VideoFormatter.php, line 113
Class
- VideoFormatter
- Plugin implementation of the 'fbia_video' formatter.
Namespace
Drupal\fb_instant_articles\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
if ($presentation = $this
->getSetting('presentation')) {
$summary[] = $this
->t('Presentation: @presentation', [
'@presentation' => $this
->presentationLabel($presentation),
]);
}
if ($this
->getSetting('controls')) {
$summary[] = $this
->t('Show controls');
}
if ($this
->getSetting('autoplay')) {
$summary[] = $this
->t('Autoplay');
}
if ($this
->getSetting('feed_cover')) {
$summary[] = $this
->t('Newsfeed cover');
}
return $summary;
}