Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / media / src / Plugin / media / Source / OEmbedDeriver.php
1 <?php
2
3 namespace Drupal\media\Plugin\media\Source;
4
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
6
7 /**
8  * Derives media source plugin definitions for supported oEmbed providers.
9  *
10  * @internal
11  *   This is an internal part of the oEmbed system and should only be used by
12  *   oEmbed-related code in Drupal core.
13  */
14 class OEmbedDeriver extends DeriverBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public function getDerivativeDefinitions($base_plugin_definition) {
20     $this->derivatives = [
21       'video' => [
22         'id' => 'video',
23         'label' => t('Remote video'),
24         'description' => t('Use remote video URL for reusable media.'),
25         'providers' => ['YouTube', 'Vimeo'],
26         'default_thumbnail_filename' => 'video.png',
27       ] + $base_plugin_definition,
28     ];
29     return parent::getDerivativeDefinitions($base_plugin_definition);
30   }
31
32 }