You are here

public function ProviderManager::getProvidersOptionList in Video 8

Same name and namespace in other branches
  1. 8.2 src/ProviderManager.php \Drupal\video\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 25

Class

ProviderManager
Gathers the provider plugins.

Namespace

Drupal\video

Code

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