public function Index::getProcessors in Search API 8
Retrieves this index's processors.
Return value
\Drupal\search_api\Processor\ProcessorInterface[] An array of all enabled processors for this index.
Overrides IndexInterface::getProcessors
9 calls to Index::getProcessors()
- Index::addProcessor in src/
Entity/ Index.php - Adds a processor to this index.
- Index::getAllPlugins in src/
Entity/ Index.php - Retrieves all the plugins contained in this index.
- Index::getProcessor in src/
Entity/ Index.php - Retrieves a specific processor plugin for this index.
- Index::getProcessorsByStage in src/
Entity/ Index.php - Loads this index's processors for a specific stage.
- Index::isValidProcessor in src/
Entity/ Index.php - Determines whether the given processor ID is valid for this index.
File
- src/
Entity/ Index.php, line 524
Class
- Index
- Defines the search index configuration entity.
Namespace
Drupal\search_api\EntityCode
public function getProcessors() {
if ($this->processorInstances !== NULL) {
return $this->processorInstances;
}
// Filter the processors to only include those that are enabled (or locked).
// We should only reach this point in the code once, at the first call after
// the index is loaded.
$this->processorInstances = [];
$processors = \Drupal::getContainer()
->get('search_api.plugin_helper')
->createProcessorPlugins($this);
foreach ($processors as $processor_id => $processor) {
if (isset($this->processor_settings[$processor_id]) || $processor
->isLocked()) {
$this->processorInstances[$processor_id] = $processor;
}
}
return $this->processorInstances;
}