You are here

protected function Geocode::getActivePlugins in Search API Location 8

Gets the active geocoder plugins.

1 call to Geocode::getActivePlugins()
Geocode::getParsedInput in modules/search_api_location_geocoder/src/Plugin/search_api_location/location_input/Geocode.php
Returns the parsed user input.

File

modules/search_api_location_geocoder/src/Plugin/search_api_location/location_input/Geocode.php, line 91

Class

Geocode
Represents the Raw Location Input.

Namespace

Drupal\search_api_location_geocoder\Plugin\search_api_location\location_input

Code

protected function getActivePlugins() {
  $plugins = $this->configuration['plugins'];
  uasort($plugins, [
    SortArray::class,
    'sortByWeightProperty',
  ]);
  $active_plugins = [];
  foreach ($plugins as $id => $plugin) {
    if ($plugin['checked']) {
      $active_plugins[$id] = $id;
    }
  }
  return $active_plugins;
}