function MediaSourceInterface::prepareFormDisplay
Same name in other branches
- 9 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::prepareFormDisplay()
- 8.9.x core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::prepareFormDisplay()
- 11.x core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::prepareFormDisplay()
Prepares the media type fields for this source in the form display.
This method should normally call \Drupal\Core\Entity\Display\EntityDisplayInterface::setComponent() or \Drupal\Core\Entity\Display\EntityDisplayInterface::removeComponent() to configure the media type fields in the form display.
Parameters
\Drupal\media\MediaTypeInterface $type: The media type which is using this source.
\Drupal\Core\Entity\Display\EntityFormDisplayInterface $display: The display which should be prepared.
See also
\Drupal\Core\Entity\Display\EntityDisplayInterface::setComponent()
\Drupal\Core\Entity\Display\EntityDisplayInterface::removeComponent()
1 method overrides MediaSourceInterface::prepareFormDisplay()
- MediaSourceBase::prepareFormDisplay in core/
modules/ media/ src/ MediaSourceBase.php - Prepares the media type fields for this source in the form display.
File
-
core/
modules/ media/ src/ MediaSourceInterface.php, line 179
Class
- MediaSourceInterface
- Defines the interface for media source plugins.
Namespace
Drupal\mediaCode
public function prepareFormDisplay(MediaTypeInterface $type, EntityFormDisplayInterface $display);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.