function OEmbed::prepareFormDisplay
Same name in other branches
- 9 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::prepareFormDisplay()
- 8.9.x core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::prepareFormDisplay()
- 10 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::prepareFormDisplay()
Overrides MediaSourceBase::prepareFormDisplay
File
-
core/
modules/ media/ src/ Plugin/ media/ Source/ OEmbed.php, line 525
Class
- OEmbed
- Provides a media source plugin for oEmbed resources.
Namespace
Drupal\media\Plugin\media\SourceCode
public function prepareFormDisplay(MediaTypeInterface $type, EntityFormDisplayInterface $display) {
parent::prepareFormDisplay($type, $display);
$source_field = $this->getSourceFieldDefinition($type)
->getName();
$display->setComponent($source_field, [
'type' => 'oembed_textfield',
'weight' => $display->getComponent($source_field)['weight'],
]);
$display->removeComponent('name');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.