function MediaSourceInterface::createSourceField

Same name in other branches
  1. 8.9.x core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::createSourceField()
  2. 10 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::createSourceField()
  3. 11.x 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.

1 method overrides MediaSourceInterface::createSourceField()
MediaSourceBase::createSourceField in core/modules/media/src/MediaSourceBase.php
Creates the source field definition for a type.

File

core/modules/media/src/MediaSourceInterface.php, line 143

Class

MediaSourceInterface
Defines the interface for media source plugins.

Namespace

Drupal\media

Code

public function createSourceField(MediaTypeInterface $type);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.