You are here

public function Facet::getProcessors in Facets 8

Returns an array of processors with their configuration.

Parameters

bool $only_enabled: Only return enabled processors.

Return value

\Drupal\facets\Processor\ProcessorInterface[] An array of processors.

Overrides FacetInterface::getProcessors

2 calls to Facet::getProcessors()
Facet::getProcessorsByStage in src/Entity/Facet.php
Loads this facets processors for a specific stage.
Facet::getQueryType in src/Entity/Facet.php
Returns the query type instance.

File

src/Entity/Facet.php, line 849

Class

Facet
Defines the facet configuration entity.

Namespace

Drupal\facets\Entity

Code

public function getProcessors($only_enabled = TRUE) {
  $processors = $this
    ->loadProcessors();

  // Filter processors by status if required. Enabled processors are those
  // which have settings in the processor_configs.
  if ($only_enabled) {
    $processors_settings = $this
      ->getProcessorConfigs();
    $processors = array_intersect_key($processors, $processors_settings);
  }
  return $processors;
}