1 | <?php |
||
14 | abstract class DisplayBase extends PluginBase implements DisplayInterface, ContainerFactoryPluginInterface { |
||
15 | |||
16 | use PluginConfigurationFormTrait; |
||
17 | |||
18 | /** |
||
19 | * Plugin label. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $label; |
||
24 | |||
25 | /** |
||
26 | * Selected entities. |
||
27 | * |
||
28 | * @var \Drupal\Core\Entity\EntityInterface[] |
||
29 | */ |
||
30 | protected $entities = []; |
||
31 | |||
32 | /** |
||
33 | * Event dispatcher service. |
||
34 | * |
||
35 | * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface |
||
36 | */ |
||
37 | protected $eventDispatcher; |
||
38 | |||
39 | /** |
||
40 | * UUID generator interface. |
||
41 | * |
||
42 | * @var \Drupal\Component\Uuid\UuidInterface |
||
43 | */ |
||
44 | protected $uuidGenerator; |
||
45 | |||
46 | /** |
||
47 | * Instance UUID string. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $uuid = NULL; |
||
52 | |||
53 | /** |
||
54 | * Constructs display plugin. |
||
55 | * |
||
56 | * @param array $configuration |
||
57 | * A configuration array containing information about the plugin instance. |
||
58 | * @param string $plugin_id |
||
59 | * The plugin_id for the plugin instance. |
||
60 | * @param mixed $plugin_definition |
||
61 | * The plugin implementation definition. |
||
62 | * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher |
||
63 | * Event dispatcher service. |
||
64 | * @param \Drupal\Component\Uuid\UuidInterface |
||
65 | * UUID generator interface. |
||
66 | */ |
||
67 | public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, UuidInterface $uuid_generator) { |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public function defaultConfiguration() { |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function getConfiguration() { |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function setConfiguration(array $configuration) { |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function calculateDependencies() { |
||
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | public function label() { |
||
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | public function getUuid() { |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function setUuid($uuid) { |
||
141 | |||
142 | } |
||
143 |