
| Current Path : /var/www/html/rocksensor1/web/core/modules/media/src/Plugin/media/Source/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/modules/media/src/Plugin/media/Source/OEmbedDeriver.php |
<?php
namespace Drupal\media\Plugin\media\Source;
use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\StringTranslation\StringTranslationTrait;
/**
* 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.
*/
class OEmbedDeriver extends DeriverBase {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
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);
}
}