You are here

interface SearchPluginInterface in Search API Autocomplete 8

Defines the autocomplete search plugin type.

Hierarchy

Expanded class hierarchy of SearchPluginInterface

All classes that implement SearchPluginInterface

See also

\Drupal\search_api_autocomplete\Annotation\SearchApiAutocompleteSearch

\Drupal\search_api_autocomplete\Search\SearchPluginManager

\Drupal\search_api_autocomplete\Search\SearchPluginBase

Plugin API

1 file declares its use of SearchPluginInterface
IndexOverviewForm.php in src/Form/IndexOverviewForm.php

File

src/Search/SearchPluginInterface.php, line 15

Namespace

Drupal\search_api_autocomplete\Search
View source
interface SearchPluginInterface extends PluginInterface {

  /**
   * Retrieves a group label for this search.
   *
   * Used to group searches from the same source together in the UI.
   *
   * @return string
   *   A translated, human-readable label to group the search by.
   */
  public function getGroupLabel();

  /**
   * Retrieves a description for this search's group.
   *
   * Searches with the same group label should aim to also return the same group
   * description.
   *
   * @return string
   *   A translated, human-readable description for this search's group.
   */
  public function getGroupDescription();

  /**
   * Retrieves the ID of the index to which this search plugin belongs.
   *
   * @return string
   *   The search plugin's index's ID.
   */
  public function getIndexId();

  /**
   * Retrieves the index to which this search plugin belongs.
   *
   * @return \Drupal\search_api\IndexInterface
   *   The search plugin's index.
   */
  public function getIndex();

  /**
   * Creates a search query based on this search.
   *
   * @param string $keys
   *   The keywords to set on the query, if possible. Otherwise, this parameter
   *   can also be ignored.
   * @param array $data
   *   (optional) Additional data passed to the callback.
   *
   * @return \Drupal\search_api\Query\QueryInterface
   *   The created query.
   *
   * @throws \Drupal\search_api_autocomplete\SearchApiAutocompleteException
   *   Thrown if the query couldn't be created.
   */
  public function createQuery($keys, array $data = []);

}

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
ConfigurablePluginInterface::getDescription public function Returns the plugin's description. 1
ConfigurablePluginInterface::label public function Returns the label for use on the administration pages. 1
ConfigurablePluginInterface::onDependencyRemoval public function Informs the plugin that some of its dependencies are being removed. 1
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
HideablePluginInterface::isHidden public function Determines whether this plugin should be hidden in the UI. 1
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
PluginInterface::getSearch public function Retrieves the search this plugin is configured for. 1
PluginInterface::setSearch public function Sets the search this plugin is configured for. 1
SearchPluginInterface::createQuery public function Creates a search query based on this search. 3
SearchPluginInterface::getGroupDescription public function Retrieves a description for this search's group. 1
SearchPluginInterface::getGroupLabel public function Retrieves a group label for this search. 1
SearchPluginInterface::getIndex public function Retrieves the index to which this search plugin belongs. 1
SearchPluginInterface::getIndexId public function Retrieves the ID of the index to which this search plugin belongs. 1