You are here

protected function FacebookMediaLibraryAddForm::getSourceFieldDefinition in Media entity facebook 3.x

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/FacebookMediaLibraryAddForm.php, line 84

Class

FacebookMediaLibraryAddForm
Creates a form to create Facebook media entities from within Media Library.

Namespace

Drupal\media_entity_facebook\Form

Code

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