You are here

interface MatcherInterface in Linkit 8.4

Same name and namespace in other branches
  1. 8.5 src/MatcherInterface.php \Drupal\linkit\MatcherInterface

Defines the interface for matchers.

Hierarchy

Expanded class hierarchy of MatcherInterface

All classes that implement MatcherInterface

See also

\Drupal\linkit\Annotation\Matcher

\Drupal\linkit\MatcherBase

\Drupal\linkit\MatcherManager

Plugin API

1 file declares its use of MatcherInterface
Profile.php in src/Entity/Profile.php
Contains \Drupal\linkit\Entity\Profile.

File

src/MatcherInterface.php, line 22
Contains \Drupal\linkit\MatcherInterface.

Namespace

Drupal\linkit
View source
interface MatcherInterface extends PluginInspectionInterface, ConfigurablePluginInterface {

  /**
   * Returns the unique ID representing the matcher.
   *
   * @return string
   *   The matcher ID.
   */
  public function getUuid();

  /**
   * Returns the matcher label.
   *
   * @return string
   *   The matcher label.
   */
  public function getLabel();

  /**
   * Returns the summarized configuration of the matcher.
   *
   * @return array
   *   An array of summarized configuration of the matcher.
   */
  public function getSummary();

  /**
   * Returns the weight of the matcher.
   *
   * @return int|string
   *   Either the integer weight of the matcher, or an empty string.
   */
  public function getWeight();

  /**
   * Sets the weight for the matcher.
   *
   * @param int $weight
   *   The weight for this matcher.
   *
   * @return $this
   */
  public function setWeight($weight);

  /**
   * Gets an array with search matches that will be presented in the autocomplete
   * widget.
   *
   * @param $string
   *   The string that contains the text to search for.
   *
   * @return array
   *   An array whose values are an associative array containing:
   *   - title: A string to use as the search result label.
   *   - description: (optional) A string with additional information about the
   *     result item.
   *   - path: The URL to the item.
   *   - group: (optional) A string with the group name for the result item.
   *     Best practice is to use the plugin name as group name.
   */
  public function getMatches($string);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
MatcherInterface::getLabel public function Returns the matcher label. 1
MatcherInterface::getMatches public function Gets an array with search matches that will be presented in the autocomplete widget. 3
MatcherInterface::getSummary public function Returns the summarized configuration of the matcher. 1
MatcherInterface::getUuid public function Returns the unique ID representing the matcher. 1
MatcherInterface::getWeight public function Returns the weight of the matcher. 1
MatcherInterface::setWeight public function Sets the weight for the matcher. 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