Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Island | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder\Attribute; |
| 6 | |
| 7 | use Drupal\Component\Plugin\Attribute\AttributeBase; |
| 8 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
| 9 | use Drupal\display_builder\IslandType; |
| 10 | |
| 11 | /** |
| 12 | * The island attribute. |
| 13 | */ |
| 14 | #[\Attribute(\Attribute::TARGET_CLASS)] |
| 15 | final class Island extends AttributeBase { |
| 16 | |
| 17 | /** |
| 18 | * Constructs a new Island instance. |
| 19 | * |
| 20 | * @param string $id |
| 21 | * The plugin ID. There are some implementation bugs that make the plugin |
| 22 | * available only if the ID follows a specific pattern. It must be either |
| 23 | * identical to group or prefixed with the group. E.g. if the group is "foo" |
| 24 | * the ID must be either "foo" or "foo:bar". |
| 25 | * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label |
| 26 | * (Optional) The human-readable name of the plugin. |
| 27 | * @param bool $enabled_by_default |
| 28 | * Island is enabled by default on new configuration. Default: False. |
| 29 | * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description |
| 30 | * (Optional) A brief description of the plugin. |
| 31 | * @param class-string|null $deriver |
| 32 | * (Optional) The deriver class. |
| 33 | * @param \Drupal\display_builder\IslandType|null $type |
| 34 | * (Optional) The island type from enumeration. |
| 35 | * @param string|null $icon |
| 36 | * (Optional) Icon for this island. |
| 37 | */ |
| 38 | public function __construct( |
| 39 | public readonly string $id, |
| 40 | public readonly ?TranslatableMarkup $label, |
| 41 | public readonly bool $enabled_by_default = FALSE, |
| 42 | public readonly ?TranslatableMarkup $description = NULL, |
| 43 | public readonly ?string $deriver = NULL, |
| 44 | public readonly ?IslandType $type = NULL, |
| 45 | public readonly ?string $icon = NULL, |
| 46 | ) {} |
| 47 | |
| 48 | } |