You are here

public function MapLinkManager::getDefinitionsOptionsList in Address Map (& Directions) Link 8

Gets the definition of all plugins as an options list.

Return value

mixed[] A sorted array of plugin definition names (empty array if no definitions were found). Keys are plugin IDs.

File

src/MapLinkManager.php, line 46

Class

MapLinkManager
Provides the Map link plugin manager.

Namespace

Drupal\address_map_link

Code

public function getDefinitionsOptionsList() {
  if (!isset($this->definitionsOptionsList)) {
    foreach ($this
      ->getDefinitions() as $pluginDefinition) {
      $this->definitionsOptionsList[$pluginDefinition['id']] = $pluginDefinition['name'];
    }
    asort($this->definitionsOptionsList);
  }
  return $this->definitionsOptionsList;
}