You are here

interface ProcessorInterface in Facets 8

Same name in this branch
  1. 8 src/Processor/ProcessorInterface.php \Drupal\facets\Processor\ProcessorInterface
  2. 8 modules/facets_summary/src/Processor/ProcessorInterface.php \Drupal\facets_summary\Processor\ProcessorInterface

Describes a processor.

Hierarchy

Expanded class hierarchy of ProcessorInterface

All classes that implement ProcessorInterface

2 files declare their use of ProcessorInterface
DefaultFacetsSummaryManager.php in modules/facets_summary/src/FacetsSummaryManager/DefaultFacetsSummaryManager.php
SummaryEntityTest.php in modules/facets_summary/tests/src/Kernel/SummaryEntityTest.php

File

modules/facets_summary/src/Processor/ProcessorInterface.php, line 14

Namespace

Drupal\facets_summary\Processor
View source
interface ProcessorInterface extends ConfigurableInterface, DependentPluginInterface, PluginInspectionInterface {

  /**
   * Processing stage: build.
   */
  const STAGE_BUILD = 'build';

  /**
   * Adds a configuration form for this processor.
   *
   * @param array $form
   *   The form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current form state.
   * @param \Drupal\facets_summary\FacetsSummaryInterface $facets_summary
   *   The facet summary this processor is being added to.
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state, FacetsSummaryInterface $facets_summary);

  /**
   * Validates a configuration form for this processor.
   *
   * @param array $form
   *   The form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current form state.
   * @param \Drupal\facets_summary\FacetsSummaryInterface $facets_summary
   *   The facet summary this processor is being added to.
   */
  public function validateConfigurationForm(array $form, FormStateInterface $form_state, FacetsSummaryInterface $facets_summary);

  /**
   * Submits a configuration form for this processor.
   *
   * @param array $form
   *   The form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current form state.
   * @param \Drupal\facets_summary\FacetsSummaryInterface $facets_summary
   *   The facet summary this processor is being added to.
   */
  public function submitConfigurationForm(array $form, FormStateInterface $form_state, FacetsSummaryInterface $facets_summary);

  /**
   * Checks whether this processor implements a particular stage.
   *
   * @param string $stage_identifier
   *   The stage that can be supported by the processor, check the constants
   *   defined in this class for a list of options.
   *
   * @return bool
   *   TRUE if the processor runs on a particular stage; FALSE otherwise.
   */
  public function supportsStage($stage_identifier);

  /**
   * Returns the default weight for a specific processing stage.
   *
   * Some processors should ensure they run earlier or later in a particular
   * stage. Processors with lower weights are run earlier. The default value is
   * used when the processor is first enabled. It can then be changed through
   * reordering by the user.
   *
   * @param string $stage
   *   The stage whose default weight should be returned. See
   *   \Drupal\facets\Processor\ProcessorPluginManager::getProcessingStages()
   *   for the valid values.
   *
   * @return int
   *   The default weight for the given stage.
   */
  public function getDefaultWeight($stage);

  /**
   * Determines whether this processor should always be enabled.
   *
   * @return bool
   *   TRUE if this processor should be forced enabled; FALSE otherwise.
   */
  public function isLocked();

  /**
   * Determines whether this processor should be hidden from the user.
   *
   * @return bool
   *   TRUE if this processor should be hidden from the user; FALSE otherwise.
   */
  public function isHidden();

  /**
   * Retrieves the processor description.
   *
   * @return string
   *   The description of this processor.
   */
  public function getDescription();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
ProcessorInterface::buildConfigurationForm public function Adds a configuration form for this processor.
ProcessorInterface::getDefaultWeight public function Returns the default weight for a specific processing stage.
ProcessorInterface::getDescription public function Retrieves the processor description.
ProcessorInterface::isHidden public function Determines whether this processor should be hidden from the user.
ProcessorInterface::isLocked public function Determines whether this processor should always be enabled.
ProcessorInterface::STAGE_BUILD constant Processing stage: build.
ProcessorInterface::submitConfigurationForm public function Submits a configuration form for this processor. 1
ProcessorInterface::supportsStage public function Checks whether this processor implements a particular stage.
ProcessorInterface::validateConfigurationForm public function Validates a configuration form for this processor.