public function OEmbedDeriver::getDerivativeDefinitions 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::getDerivativeDefinitions()
- 9 core/modules/media/src/Plugin/media/Source/OEmbedDeriver.php \Drupal\media\Plugin\media\Source\OEmbedDeriver::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- core/
modules/ media/ src/ Plugin/ media/ Source/ OEmbedDeriver.php, line 19
Class
- OEmbedDeriver
- Derives media source plugin definitions for supported oEmbed providers.
Namespace
Drupal\media\Plugin\media\SourceCode
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);
}