public function Video::createSourceField in Media entity video 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/media/Source/Video.php \Drupal\media_entity_video\Plugin\media\Source\Video::createSourceField()
Creates the source field definition for a type.
Parameters
\Drupal\media\MediaTypeInterface $type: The media type.
Return value
\Drupal\field\FieldConfigInterface The unsaved field definition. The field storage definition, if new, should also be unsaved.
Overrides File::createSourceField
File
- src/
Plugin/ media/ Source/ Video.php, line 24
Class
- Video
- Provides media type plugin for Video.
Namespace
Drupal\media_entity_video\Plugin\media\SourceCode
public function createSourceField(MediaTypeInterface $type) {
return parent::createSourceField($type)
->set('settings', [
'file_extensions' => 'mp4 webm ogg ogv',
]);
}