You are here

interface SearchInterface in Fast Autocomplete 8

Defines an interface for search plugins.

Hierarchy

Expanded class hierarchy of SearchInterface

All classes that implement SearchInterface

File

src/SearchInterface.php, line 11

Namespace

Drupal\fac
View source
interface SearchInterface extends PluginInspectionInterface {

  /**
   * Return the name of the search plugin.
   *
   * @return string
   *   The name of the plugin.
   */
  public function getName();

  /**
   * 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 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);

}

Members

Namesort descending Modifiers Type Description Overrides
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
SearchInterface::getConfigForm public function Gets the configuration form for the search plugin. 1
SearchInterface::getName public function Return the name of the search plugin. 1
SearchInterface::getResults public function Return the results for the given key. 1