You are here

public function GlossaryAZWidgetOrderProcessor::defaultConfiguration in Search API AZ Glossary 8

Same name and namespace in other branches
  1. 8.4 src/Plugin/facets/processor/GlossaryAZWidgetOrderProcessor.php \Drupal\search_api_glossary\Plugin\facets\processor\GlossaryAZWidgetOrderProcessor::defaultConfiguration()
  2. 8.2 src/Plugin/facets/processor/GlossaryAZWidgetOrderProcessor.php \Drupal\search_api_glossary\Plugin\facets\processor\GlossaryAZWidgetOrderProcessor::defaultConfiguration()
  3. 8.3 src/Plugin/facets/processor/GlossaryAZWidgetOrderProcessor.php \Drupal\search_api_glossary\Plugin\facets\processor\GlossaryAZWidgetOrderProcessor::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides SortProcessorPluginBase::defaultConfiguration

1 call to GlossaryAZWidgetOrderProcessor::defaultConfiguration()
GlossaryAZWidgetOrderProcessor::buildConfigurationForm in src/Plugin/facets/processor/GlossaryAZWidgetOrderProcessor.php
Adds a configuration form for this processor.

File

src/Plugin/facets/processor/GlossaryAZWidgetOrderProcessor.php, line 173

Class

GlossaryAZWidgetOrderProcessor
A processor that orders the results by display value.

Namespace

Drupal\search_api_glossary\Plugin\facets\processor

Code

public function defaultConfiguration() {
  $sort_options_deafult = array(
    'glossaryaz_sort_az' => array(
      'weight' => 1,
      'name' => $this
        ->t('Alpha (A-Z)'),
    ),
    'glossaryaz_sort_09' => array(
      'weight' => 2,
      'name' => $this
        ->t('Numeric (0-9)'),
    ),
    'glossaryaz_sort_other' => array(
      'weight' => 3,
      'name' => $this
        ->t('Other (#)'),
    ),
    'glossaryaz_sort_all' => array(
      'weight' => -1,
      'name' => $this
        ->t('All'),
    ),
  );
  return $sort_options_deafult;
}