You are here

public function ProviderManager::getProvidersOptionList in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 src/ProviderManager.php \Drupal\video_embed_field\ProviderManager::getProvidersOptionList()

Get an options list suitable for form elements for provider selection.

Return value

array An array of options keyed by plugin ID with label values.

Overrides ProviderManagerInterface::getProvidersOptionList

File

src/ProviderManager.php, line 26

Class

ProviderManager
Gathers the provider plugins.

Namespace

Drupal\video_embed_field

Code

public function getProvidersOptionList() {
  $options = [];
  foreach ($this
    ->getDefinitions() as $definition) {
    $options[$definition['id']] = $definition['title'];
  }
  return $options;
}