1 | <?php |
||
44 | class EmbedButton extends ConfigEntityBase implements EmbedButtonInterface { |
||
45 | |||
46 | use StringTranslationTrait; |
||
47 | |||
48 | /** |
||
49 | * The EmbedButton ID. |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | public $id; |
||
54 | |||
55 | /** |
||
56 | * Label of EmbedButton. |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | public $label; |
||
61 | |||
62 | /** |
||
63 | * The embed type plugin ID. |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | public $type_id; |
||
68 | |||
69 | /** |
||
70 | * Embed type settings. |
||
71 | * |
||
72 | * An array of key/value pairs. |
||
73 | * |
||
74 | * @var array |
||
75 | */ |
||
76 | public $type_settings = []; |
||
77 | |||
78 | /** |
||
79 | * UUID of the button's icon file. |
||
80 | * |
||
81 | * @var string |
||
82 | */ |
||
83 | public $icon_uuid; |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function getTypeId() { |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getTypeLabel() { |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function getTypePlugin() { |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function getIconFile() { |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function getIconUrl() { |
||
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | public function calculateDependencies() { |
||
151 | |||
152 | /** |
||
153 | * Gets the embed type plugin manager. |
||
154 | * |
||
155 | * @return \Drupal\embed\EmbedType\EmbedTypeManager |
||
156 | * The embed type plugin manager. |
||
157 | */ |
||
158 | protected function embedTypeManager() { |
||
161 | |||
162 | /** |
||
163 | * Gets the file usage service. |
||
164 | * |
||
165 | * @return \Drupal\file\FileUsage\FileUsageInterface |
||
166 | * The file usage service. |
||
167 | */ |
||
168 | protected function fileUsage() { |
||
171 | |||
172 | /** |
||
173 | * {@inheritdoc} |
||
174 | */ |
||
175 | public function postSave(EntityStorageInterface $storage, $update = TRUE) { |
||
193 | |||
194 | /** |
||
195 | * {@inheritdoc} |
||
196 | */ |
||
197 | public static function postDelete(EntityStorageInterface $storage, array $entities) { |
||
208 | |||
209 | /** |
||
210 | * {@inheritdoc} |
||
211 | */ |
||
212 | public function getTypeSetting($key, $default = NULL) { |
||
220 | |||
221 | /** |
||
222 | * {@inheritdoc} |
||
223 | */ |
||
224 | public function getTypeSettings() { |
||
227 | |||
228 | } |
||
229 |