1 | <?php |
||
17 | abstract class DisplayBase extends PluginBase implements DisplayInterface, ContainerFactoryPluginInterface { |
||
18 | |||
19 | use PluginConfigurationFormTrait; |
||
20 | |||
21 | /** |
||
22 | * Plugin label. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $label; |
||
27 | |||
28 | /** |
||
29 | * Selected entities. |
||
30 | * |
||
31 | * @var \Drupal\Core\Entity\EntityInterface[] |
||
32 | */ |
||
33 | protected $entities = []; |
||
34 | |||
35 | /** |
||
36 | * Event dispatcher service. |
||
37 | * |
||
38 | * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface |
||
39 | */ |
||
40 | protected $eventDispatcher; |
||
41 | |||
42 | /** |
||
43 | * UUID generator interface. |
||
44 | * |
||
45 | * @var \Drupal\Component\Uuid\UuidInterface |
||
46 | */ |
||
47 | protected $uuidGenerator; |
||
48 | |||
49 | /** |
||
50 | * Instance UUID string. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $uuid = NULL; |
||
55 | |||
56 | /** |
||
57 | * The selection storage. |
||
58 | * |
||
59 | * @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface |
||
60 | */ |
||
61 | protected $selectionStorage; |
||
62 | |||
63 | /** |
||
64 | * Constructs display plugin. |
||
65 | * |
||
66 | * @param array $configuration |
||
67 | * A configuration array containing information about the plugin instance. |
||
68 | * @param string $plugin_id |
||
69 | * The plugin_id for the plugin instance. |
||
70 | * @param mixed $plugin_definition |
||
71 | * The plugin implementation definition. |
||
72 | * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher |
||
73 | * Event dispatcher service. |
||
74 | * @param \Drupal\Component\Uuid\UuidInterface |
||
75 | * UUID generator interface. |
||
76 | */ |
||
77 | public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, UuidInterface $uuid_generator, KeyValueStoreExpirableInterface $selection_storage) { |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function defaultConfiguration() { |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function getConfiguration() { |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function setConfiguration(array $configuration) { |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function calculateDependencies() { |
||
129 | |||
130 | /** |
||
131 | * {@inheritdoc} |
||
132 | */ |
||
133 | public function label() { |
||
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | public function getUuid() { |
||
146 | |||
147 | /** |
||
148 | * {@inheritdoc} |
||
149 | */ |
||
150 | public function setUuid($uuid) { |
||
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | public function displayEntityBrowser(FormStateInterface $form_state, array $entities = []) { |
||
164 | |||
165 | } |
||
166 |