function OEmbed::prepareViewDisplay
Overrides MediaSourceBase::prepareViewDisplay
File
- 
              core/modules/ media/ src/ Plugin/ media/ Source/ OEmbed.php, line 515 
Class
- OEmbed
- Provides a media source plugin for oEmbed resources.
Namespace
Drupal\media\Plugin\media\SourceCode
public function prepareViewDisplay(MediaTypeInterface $type, EntityViewDisplayInterface $display) {
  $display->setComponent($this->getSourceFieldDefinition($type)
    ->getName(), [
    'type' => 'oembed',
    'label' => 'visually_hidden',
  ]);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
