public function Twitter::createSourceField in Media entity Twitter 8.2
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 MediaSourceBase::createSourceField
File
- src/
Plugin/ media/ Source/ Twitter.php, line 391
Class
- Twitter entity media source.
Namespace
Drupal\media_entity_twitter\Plugin\media\SourceCode
public function createSourceField(MediaTypeInterface $type) {
return parent::createSourceField($type)
->set('label', 'Tweet URL');
}