You are here

public function ParseModePluginManager::getInstancesOptions in Search API 8

Returns all parse modes known by the Search API as an options list.

Return value

string[] An associative array with all parse mode's IDs as keys, mapped to their translated labels.

See also

\Drupal\search_api\ParseMode\ParseModePluginManager::getInstances()

File

src/ParseMode/ParseModePluginManager.php, line 69

Class

ParseModePluginManager
Manages parse mode plugins.

Namespace

Drupal\search_api\ParseMode

Code

public function getInstancesOptions() {
  $parse_modes = [];
  foreach ($this
    ->getInstances() as $id => $info) {
    $parse_modes[$id] = $info
      ->label();
  }
  return $parse_modes;
}