protected function VideoEmbedField::loadProvider in Video Embed Field 8
Load a video provider given a media entity.
Parameters
\Drupal\media_entity\MediaInterface $media: The media entity.
Return value
\Drupal\video_embed_field\ProviderPluginInterface The provider plugin.
2 calls to VideoEmbedField::loadProvider()
- VideoEmbedField::getDefaultName in modules/
video_embed_media/ src/ Plugin/ MediaEntity/ Type/ VideoEmbedField.php - Provide a default name for the media.
- VideoEmbedField::thumbnail in modules/
video_embed_media/ src/ Plugin/ MediaEntity/ Type/ VideoEmbedField.php - Gets thumbnail image.
File
- modules/
video_embed_media/ src/ Plugin/ MediaEntity/ Type/ VideoEmbedField.php, line 166
Class
- VideoEmbedField
- Provides media type plugin for video embed field.
Namespace
Drupal\video_embed_media\Plugin\MediaEntity\TypeCode
protected function loadProvider(MediaInterface $media) {
$video_url = $this
->getVideoUrl($media);
return !empty($video_url) ? $this->providerManager
->loadProviderFromInput($video_url) : FALSE;
}