function FileVideoFormatter::prepareAttributes
Same name in other branches
- 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/FileVideoFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileVideoFormatter::prepareAttributes()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/FileVideoFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileVideoFormatter::prepareAttributes()
- 11.x core/modules/file/src/Plugin/Field/FieldFormatter/FileVideoFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileVideoFormatter::prepareAttributes()
Overrides FileMediaFormatterBase::prepareAttributes
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileVideoFormatter.php, line 88
Class
- FileVideoFormatter
- Plugin implementation of the 'file_video' formatter.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
protected function prepareAttributes(array $additional_attributes = []) {
return parent::prepareAttributes([
'muted',
])->setAttribute('width', $this->getSetting('width'))
->setAttribute('height', $this->getSetting('height'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.