public function DisplayPluginManager::getInstances in Search API 8
Returns all known displays.
Return value
\Drupal\search_api\Display\DisplayInterface[] An array of display plugins, keyed by type identifier.
Overrides DisplayPluginManagerInterface::getInstances
File
- src/
Display/ DisplayPluginManager.php, line 54
Class
- DisplayPluginManager
- Manages display plugins.
Namespace
Drupal\search_api\DisplayCode
public function getInstances() {
if ($this->displays === NULL) {
$this->displays = [];
foreach ($this
->getDefinitions() as $name => $display_definition) {
if (class_exists($display_definition['class']) && empty($this->displays[$name])) {
$display = $this
->createInstance($name);
$this->displays[$name] = $display;
}
}
}
return $this->displays;
}