You are here

public function FacetsSummary::getProcessors in Facets 8

Returns an array of processors with their configuration.

Parameters

bool $only_enabled: Only return enabled processors.

Return value

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

Overrides FacetsSummaryInterface::getProcessors

1 call to FacetsSummary::getProcessors()
FacetsSummary::getProcessorsByStage in modules/facets_summary/src/Entity/FacetsSummary.php
Loads this facets processors for a specific stage.

File

modules/facets_summary/src/Entity/FacetsSummary.php, line 217

Class

FacetsSummary
Defines the facet summary entity.

Namespace

Drupal\facets_summary\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;
}