You are here

public function ResetFacetsProcessor::buildConfigurationForm in Facets 8

Adds a configuration form for this processor.

Parameters

array $form: The form.

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

\Drupal\facets_summary\FacetsSummaryInterface $facets_summary: The facet summary this processor is being added to.

Overrides ProcessorPluginBase::buildConfigurationForm

File

modules/facets_summary/src/Plugin/facets_summary/processor/ResetFacetsProcessor.php, line 91

Class

ResetFacetsProcessor
Provides a processor that adds a link to reset facet filters.

Namespace

Drupal\facets_summary\Plugin\facets_summary\processor

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state, FacetsSummaryInterface $facets_summary) {

  // By default, there should be no config form.
  $config = $this
    ->getConfiguration();
  $build['link_text'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Reset facets link text'),
    '#default_value' => $config['link_text'],
  ];
  return $build;
}