public function MediaSourceBase::prepareViewDisplay in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/MediaSourceBase.php \Drupal\media\MediaSourceBase::prepareViewDisplay()
- 9 core/modules/media/src/MediaSourceBase.php \Drupal\media\MediaSourceBase::prepareViewDisplay()
1 call to MediaSourceBase::prepareViewDisplay()
- TestDifferentDisplays::prepareViewDisplay in core/
modules/ media/ tests/ modules/ media_test_source/ src/ Plugin/ media/ Source/ TestDifferentDisplays.php - Prepares the media type fields for this source in the view display.
6 methods override MediaSourceBase::prepareViewDisplay()
- AudioFile::prepareViewDisplay in core/
modules/ media/ src/ Plugin/ media/ Source/ AudioFile.php - Prepares the media type fields for this source in the view display.
- Image::prepareViewDisplay in core/
modules/ media/ src/ Plugin/ media/ Source/ Image.php - Prepares the media type fields for this source in the view display.
- OEmbed::prepareViewDisplay in core/
modules/ media/ src/ Plugin/ media/ Source/ OEmbed.php - Prepares the media type fields for this source in the view display.
- TestDifferentDisplays::prepareViewDisplay in core/
modules/ media/ tests/ modules/ media_test_source/ src/ Plugin/ media/ Source/ TestDifferentDisplays.php - Prepares the media type fields for this source in the view display.
- TestWithHiddenSourceField::prepareViewDisplay in core/
modules/ media/ tests/ modules/ media_test_source/ src/ Plugin/ media/ Source/ TestWithHiddenSourceField.php - Prepares the media type fields for this source in the view display.
File
- core/
modules/ media/ src/ MediaSourceBase.php, line 345
Class
- MediaSourceBase
- Base implementation of media source plugin.
Namespace
Drupal\mediaCode
public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayInterface $display) {
$display
->setComponent($this
->getSourceFieldDefinition($type)
->getName(), [
'label' => 'visually_hidden',
]);
}