Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
VisitorsEvent | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Drupal\visitors\Attribute; |
4 | |
5 | use Drupal\Component\Plugin\Attribute\Plugin; |
6 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
7 | |
8 | /** |
9 | * Defines a Visitors Event attribute. |
10 | * |
11 | * Plugin Namespace: Plugin\VisitorsEvent. |
12 | * |
13 | * @see \Drupal\visitors\VisitorsEventPluginManager |
14 | * @see plugin_api |
15 | */ |
16 | #[\Attribute(\Attribute::TARGET_CLASS)] |
17 | class VisitorsEvent extends Plugin { |
18 | |
19 | /** |
20 | * Constructs a VisitorsEvent attribute. |
21 | * |
22 | * @param string $id |
23 | * The plugin ID. |
24 | * @param \Drupal\Core\StringTranslation\TranslatableMarkup|string|null $label |
25 | * The human-readable name of the plugin. |
26 | * @param string|null $plugin |
27 | * The plugin name that generated this event. |
28 | * @param array $variables |
29 | * Array of variables (up to 4) associated with this event. |
30 | * @param int $weight |
31 | * The weight of the event (lower numbers appear earlier). |
32 | * @param class-string|null $deriver |
33 | * (optional) The deriver class for this plugin. |
34 | */ |
35 | public function __construct( |
36 | public readonly string $id, |
37 | public readonly TranslatableMarkup|string|null $label = NULL, |
38 | public readonly ?string $plugin = NULL, |
39 | public readonly array $variables = [], |
40 | public readonly int $weight = 0, |
41 | public readonly ?string $deriver = NULL, |
42 | ) {} |
43 | |
44 | } |