You are here

abstract class SearchBase in Fast Autocomplete 8

Class SearchBase.

Hierarchy

Expanded class hierarchy of SearchBase

2 files declare their use of SearchBase
BasicTitleSearch.php in src/Plugin/Search/BasicTitleSearch.php
SearchApiSearch.php in src/Plugin/Search/SearchApiSearch.php

File

src/SearchBase.php, line 11

Namespace

Drupal\fac
View source
abstract class SearchBase extends PluginBase implements SearchInterface {

  /**
   * Returns the plugin name.
   */
  public function getName() {
    return $this->pluginDefinition['name'];
  }

  /**
   * Gets the configuration form for the search plugin.
   *
   * @param array $plugin_config
   *   The plugin config array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   *
   * @return array
   *   The configuration form for the search plugin.
   */
  public function getConfigForm(array $plugin_config, FormStateInterface $form_state) {
    return [];
  }

  /**
   * Return the results for the given key.
   *
   * @param \Drupal\fac\FacConfigInterface $fac_config
   *   The Fac Config object.
   * @param string $langcode
   *   The language code.
   * @param string $key
   *   The query string to get results for.
   *
   * @return array
   *   The result entity ids for the given key.
   */
  public function getResults(FacConfigInterface $fac_config, $langcode, $key) {
    return [];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92
SearchBase::getConfigForm public function Gets the configuration form for the search plugin. Overrides SearchInterface::getConfigForm 2
SearchBase::getName public function Returns the plugin name. Overrides SearchInterface::getName
SearchBase::getResults public function Return the results for the given key. Overrides SearchInterface::getResults 2