You are here

public function EmbedTypeManager::getDefinitionOptions in Embed 8

Provides a list of plugins suitable for form options.

Return value

array An array of valid plugin labels, keyed by plugin ID.

File

src/EmbedType/EmbedTypeManager.php, line 42

Class

EmbedTypeManager
Provides an Embed type plugin manager.

Namespace

Drupal\embed\EmbedType

Code

public function getDefinitionOptions() {
  $options = array_map(function ($definition) {
    return (string) $definition['label'];
  }, $this
    ->getDefinitions());
  natsort($options);
  return $options;
}