public function MediaSourceInterface::createSourceField in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::createSourceField()
- 9 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::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.
File
- core/
modules/ media/ src/ MediaSourceInterface.php, line 143
Class
- MediaSourceInterface
- Defines the interface for media source plugins.
Namespace
Drupal\mediaCode
public function createSourceField(MediaTypeInterface $type);