You are here

protected function TwitterMediaLibraryAddForm::getSourceFieldDefinition in Media entity Twitter 8.2

Returns the definition of the source field for a media type.

Parameters

\Drupal\media\MediaTypeInterface $media_type: The media type to get the source definition for.

Return value

\Drupal\Core\Field\FieldDefinitionInterface|null The field definition.

File

src/Form/TwitterMediaLibraryAddForm.php, line 92

Class

TwitterMediaLibraryAddForm
Creates a form to create Twitter media entities from within Media Library.

Namespace

Drupal\media_entity_twitter\Form

Code

protected function getSourceFieldDefinition(MediaTypeInterface $media_type) {
  return $media_type
    ->getSource()
    ->getSourceFieldDefinition($media_type);
}