public function MediaSourceInterface::prepareViewDisplay in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::prepareViewDisplay()
- 10 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::prepareViewDisplay()
Prepares the media type fields for this source in the view 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 view display.
Parameters
\Drupal\media\MediaTypeInterface $type: The media type which is using this source.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface $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::prepareViewDisplay()
- MediaSourceBase::prepareViewDisplay in core/
modules/ media/ src/ MediaSourceBase.php - Prepares the media type fields for this source in the view display.
File
- core/
modules/ media/ src/ MediaSourceInterface.php, line 162
Class
- MediaSourceInterface
- Defines the interface for media source plugins.
Namespace
Drupal\mediaCode
public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayInterface $display);