Lines: 100.00%
| Line | Hits | Source |
|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Drupal\visitors\Attribute; | |
| 6 | ||
| 7 | use Drupal\Component\Plugin\Attribute\Plugin; | |
| 8 | use Drupal\Core\StringTranslation\TranslatableMarkup; | |
| 9 | ||
| 10 | /** | |
| 11 | * Defines a site search detector attribute. | |
| 12 | * | |
| 13 | * Plugin namespace: Plugin\VisitorsSiteSearch. | |
| 14 | * | |
| 15 | * @see \Drupal\visitors\VisitorsSiteSearchPluginManager | |
| 16 | */ | |
| 17 | #[\Attribute(\Attribute::TARGET_CLASS)] | |
| 18 | class VisitorsSiteSearch extends Plugin { | |
| 19 | ||
| 20 | /** | |
| 21 | * Constructs a VisitorsSiteSearch attribute. | |
| 22 | * | |
| 23 | * @param string $id | |
| 24 | * The plugin ID. | |
| 25 | * @param \Drupal\Core\StringTranslation\TranslatableMarkup|string|null $label | |
| 26 | * The human-readable name of the plugin. | |
| 27 | * @param int $weight | |
| 28 | * The weight. Lower numbers are tried first. | |
| 29 | * @param class-string|null $deriver | |
| 30 | * (optional) The deriver class for this plugin. | |
| 31 | */ | |
| 32 | public function __construct( | |
| 33 | public readonly string $id, | |
| 34 | public readonly TranslatableMarkup|string|null $label = NULL, | |
| 35 | public readonly int $weight = 0, | |
| 36 | public readonly ?string $deriver = NULL, | |
| 37 | 11 | ) {} |
| 38 | ||
| 39 | } |