DummyMatcher.php in Linkit 8.4
File
tests/linkit_test/src/Plugin/Linkit/Matcher/DummyMatcher.php
View source
<?php
namespace Drupal\linkit_test\Plugin\Linkit\Matcher;
use Drupal\linkit\MatcherBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
class DummyMatcher extends MatcherBase {
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition);
}
public function getMatches($string) {
$matches[] = [
'title' => 'DummyMatcher title',
'description' => 'DummyMatcher description',
'path' => 'http://example.com',
'group' => 'DummyMatcher',
];
return $matches;
}
}
Classes
Name |
Description |
DummyMatcher |
Plugin annotation
@Matcher(
id = "dummy_matcher",
label = @Translation("Dummy Matcher"),
) |