5 * Contains \Drupal\linkit\MatcherInterface.
8 namespace Drupal\linkit;
10 use Drupal\Component\Plugin\ConfigurablePluginInterface;
11 use Drupal\Component\Plugin\PluginInspectionInterface;
12 use Drupal\Core\Plugin\PluginFormInterface;
15 * Defines the interface for matchers.
17 * @see \Drupal\linkit\Annotation\Matcher
18 * @see \Drupal\linkit\MatcherBase
19 * @see \Drupal\linkit\MatcherManager
22 interface MatcherInterface extends PluginInspectionInterface, ConfigurablePluginInterface {
25 * Returns the unique ID representing the matcher.
30 public function getUuid();
33 * Returns the matcher label.
38 public function getLabel();
41 * Returns the summarized configuration of the matcher.
44 * An array of summarized configuration of the matcher.
46 public function getSummary();
49 * Returns the weight of the matcher.
52 * Either the integer weight of the matcher, or an empty string.
54 public function getWeight();
57 * Sets the weight for the matcher.
60 * The weight for this matcher.
64 public function setWeight($weight);
67 * Gets an array with search matches that will be presented in the autocomplete
71 * The string that contains the text to search for.
74 * An array whose values are an associative array containing:
75 * - title: A string to use as the search result label.
76 * - description: (optional) A string with additional information about the
78 * - path: The URL to the item.
79 * - group: (optional) A string with the group name for the result item.
80 * Best practice is to use the plugin name as group name.
82 public function getMatches($string);