You are here

interface MatcherInterface in Linkit 8.5

Same name and namespace in other branches
  1. 8.4 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

File

src/MatcherInterface.php, line 17

Namespace

Drupal\linkit
View source
interface MatcherInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface {

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

  /**
   * Executes the matcher.
   *
   * @param string $string
   *   The string that contains the text to search for.
   *
   * @return \Drupal\linkit\Suggestion\SuggestionCollection
   *   A suggestion collection.
   */
  public function execute($string);

}

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
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
MatcherInterface::execute public function Executes the matcher. 5
MatcherInterface::getLabel public function Returns the matcher label. 1
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