function 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 545

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'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.