public function Video::settingsSummary in Video Embed Field 8.2
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldFormatter/Video.php \Drupal\video_embed_field\Plugin\Field\FieldFormatter\Video::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 FormatterBase::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ Video.php, line 183
Class
- Video
- Plugin implementation of the video field formatter.
Namespace
Drupal\video_embed_field\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$dimensions = $this
->getSetting('responsive') ? $this
->t('Responsive') : $this
->t('@widthx@height', [
'@width' => $this
->getSetting('width'),
'@height' => $this
->getSetting('height'),
]);
$summary[] = $this
->t('Embedded Video (@dimensions@autoplay).', [
'@dimensions' => $dimensions,
'@autoplay' => $this
->getSetting('autoplay') ? $this
->t(', autoplaying') : '',
]);
return $summary;
}