Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. OEmbedDeriver.php

function OEmbedDeriver::getDerivativeDefinitions

Overrides DeriverBase::getDerivativeDefinitions

File

core/modules/media/src/Plugin/media/Source/OEmbedDeriver.php, line 22

Class

OEmbedDeriver
Derives media source plugin definitions for supported oEmbed providers.

Namespace

Drupal\media\Plugin\media\Source

Code

public function getDerivativeDefinitions($base_plugin_definition) {
    $this->derivatives = [
        'video' => [
            'id' => 'video',
            'label' => $this->t('Remote video'),
            'description' => $this->t('Use remote video URL for reusable media.'),
            'providers' => [
                'YouTube',
                'Vimeo',
            ],
            'default_thumbnail_filename' => 'video.png',
        ] + $base_plugin_definition,
    ];
    return parent::getDerivativeDefinitions($base_plugin_definition);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal