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