class OEmbedDeriver in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/Plugin/media/Source/OEmbedDeriver.php \Drupal\media\Plugin\media\Source\OEmbedDeriver
- 9 core/modules/media/src/Plugin/media/Source/OEmbedDeriver.php \Drupal\media\Plugin\media\Source\OEmbedDeriver
Derives media source plugin definitions for supported oEmbed providers.
@internal This is an internal part of the oEmbed system and should only be used by oEmbed-related code in Drupal core.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\media\Plugin\media\Source\OEmbedDeriver
Expanded class hierarchy of OEmbedDeriver
File
- core/
modules/ media/ src/ Plugin/ media/ Source/ OEmbedDeriver.php, line 14
Namespace
Drupal\media\Plugin\media\SourceView source
class OEmbedDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [
'video' => [
'id' => 'video',
'label' => t('Remote video'),
'description' => 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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
OEmbedDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |