You are here

public function LeafletTileLayerPluginManager::getLeafletTilesLayersOptions in Geofield Map 8.2

Get the id => label associative array of all defined Leaflet Tile Layers.

File

src/LeafletTileLayerPluginManager.php, line 66

Class

LeafletTileLayerPluginManager
Provides the Leaflet tile layers plugin plugin manager.

Namespace

Drupal\geofield_map

Code

public function getLeafletTilesLayersOptions() {
  $options = [];
  foreach ($this
    ->getDefinitions() as $k => $plugin) {
    $options[$k] = $plugin['label'];
  }
  ksort($options);
  return $options;
}