You are here

public function FacetsSummary::addProcessor in Facets 8

Adds a processor for this facet.

Parameters

array $processor: An array definition for a processor.

Overrides FacetsSummaryInterface::addProcessor

File

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

Class

FacetsSummary
Defines the facet summary entity.

Namespace

Drupal\facets_summary\Entity

Code

public function addProcessor(array $processor) {
  $this->processor_configs[$processor['processor_id']] = [
    'processor_id' => $processor['processor_id'],
    'weights' => $processor['weights'],
    'settings' => $processor['settings'],
  ];

  // Sort the processors so we won't have unnecessary changes.
  ksort($this->processor_configs);
}