You are here

public function OEmbed::getProviders in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::getProviders()

Returns the oEmbed provider names.

The allowed providers can be configured by the user. If it is not configured, all providers supported by the plugin are returned.

Return value

string[] A list of oEmbed provider names.

Overrides OEmbedInterface::getProviders

File

core/modules/media/src/Plugin/media/Source/OEmbed.php, line 475

Class

OEmbed
Provides a media source plugin for oEmbed resources.

Namespace

Drupal\media\Plugin\media\Source

Code

public function getProviders() {
  $configuration = $this
    ->getConfiguration();
  return $configuration['providers'] ?: $this
    ->getPluginDefinition()['providers'];
}