You are here

public function MapCenterBase::getAvailableMapCenterOptions in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 src/MapCenterBase.php \Drupal\geolocation\MapCenterBase::getAvailableMapCenterOptions()

For one MapCenter (i.e. boundary filter), return all options (all filters).

Parameters

mixed $context: Context like field formatter, field widget or view.

Return value

array Available center options indexed by ID.

Overrides MapCenterInterface::getAvailableMapCenterOptions

3 methods override MapCenterBase::getAvailableMapCenterOptions()
Location::getAvailableMapCenterOptions in src/Plugin/geolocation/MapCenter/Location.php
For one MapCenter (i.e. boundary filter), return all options (all filters).
ViewsBoundaryArgument::getAvailableMapCenterOptions in src/Plugin/geolocation/MapCenter/ViewsBoundaryArgument.php
For one MapCenter (i.e. boundary filter), return all options (all filters).
ViewsBoundaryFilter::getAvailableMapCenterOptions in src/Plugin/geolocation/MapCenter/ViewsBoundaryFilter.php
For one MapCenter (i.e. boundary filter), return all options (all filters).

File

src/MapCenterBase.php, line 62

Class

MapCenterBase
Class MapCenterBase.

Namespace

Drupal\geolocation

Code

public function getAvailableMapCenterOptions($context) {
  return [
    $this
      ->getPluginId() => $this
      ->getPluginDefinition()['name'],
  ];
}