1 | <?php |
||
45 | class GalleryBlockService extends AbstractBlockService |
||
46 | { |
||
47 | /** |
||
48 | * @var ManagerInterface |
||
49 | */ |
||
50 | protected $galleryAdmin; |
||
51 | |||
52 | /** |
||
53 | * @var ManagerInterface |
||
54 | */ |
||
55 | protected $galleryManager; |
||
56 | |||
57 | /** |
||
58 | * @var ContainerInterface |
||
59 | */ |
||
60 | private $container; |
||
61 | |||
62 | /** |
||
63 | * NEXT_MAJOR: Remove `$templating` argument. |
||
64 | * |
||
65 | * @param Environment|string $twigOrName |
||
66 | */ |
||
67 | public function __construct($twigOrName, ?EngineInterface $templating, ContainerInterface $container, ManagerInterface $galleryManager) |
||
74 | |||
75 | /** |
||
76 | * @return Pool |
||
77 | */ |
||
78 | public function getMediaPool() |
||
82 | |||
83 | /** |
||
84 | * @return AdminInterface |
||
85 | */ |
||
86 | public function getGalleryAdmin() |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function configureSettings(OptionsResolver $resolver): void |
||
114 | |||
115 | /** |
||
116 | * NEXT_MAJOR: Remove this method. |
||
117 | * |
||
118 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. You should use |
||
119 | * `Sonata\BlockBundle\Block\Service\EditableBlockService` interface instead. |
||
120 | */ |
||
121 | public function buildEditForm(FormMapper $formMapper, BlockInterface $block): void |
||
197 | |||
198 | /** |
||
199 | * {@inheritdoc} |
||
200 | */ |
||
201 | public function execute(BlockContextInterface $blockContext, ?Response $response = null) |
||
212 | |||
213 | /** |
||
214 | * {@inheritdoc} |
||
215 | */ |
||
216 | public function load(BlockInterface $block): void |
||
226 | |||
227 | /** |
||
228 | * NEXT_MAJOR: Remove this method. |
||
229 | * |
||
230 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
231 | */ |
||
232 | public function prePersist(BlockInterface $block): void |
||
236 | |||
237 | /** |
||
238 | * NEXT_MAJOR: Remove this method. |
||
239 | * |
||
240 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
241 | */ |
||
242 | public function preUpdate(BlockInterface $block): void |
||
246 | |||
247 | /** |
||
248 | * NEXT_MAJOR: Remove this method. |
||
249 | * |
||
250 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. You should use |
||
251 | * `Sonata\BlockBundle\Block\Service\EditableBlockService` interface instead. |
||
252 | */ |
||
253 | public function getBlockMetadata($code = null) |
||
259 | |||
260 | /** |
||
261 | * NEXT_MAJOR: Remove this method. |
||
262 | * |
||
263 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. You should use |
||
264 | * `Sonata\BlockBundle\Block\Service\EditableBlockService` interface instead. |
||
265 | */ |
||
266 | public function buildCreateForm(FormMapper $formMapper, BlockInterface $block) |
||
270 | |||
271 | /** |
||
272 | * NEXT_MAJOR: Remove this method. |
||
273 | * |
||
274 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
275 | */ |
||
276 | public function postPersist(BlockInterface $block) |
||
279 | |||
280 | /** |
||
281 | * NEXT_MAJOR: Remove this method. |
||
282 | * |
||
283 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
284 | */ |
||
285 | public function postUpdate(BlockInterface $block) |
||
288 | |||
289 | /** |
||
290 | * NEXT_MAJOR: Remove this method. |
||
291 | * |
||
292 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
293 | */ |
||
294 | public function preRemove(BlockInterface $block) |
||
297 | |||
298 | /** |
||
299 | * NEXT_MAJOR: Remove this method. |
||
300 | * |
||
301 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. |
||
302 | */ |
||
303 | public function postRemove(BlockInterface $block) |
||
306 | |||
307 | /** |
||
308 | * NEXT_MAJOR: Remove this method. |
||
309 | * |
||
310 | * @deprecated since sonata-project/media-bundle 3.25, to be removed in 4.0. You should use |
||
311 | * `Sonata\BlockBundle\Block\Service\EditableBlockService` interface instead. |
||
312 | */ |
||
313 | public function validateBlock(ErrorElement $errorElement, BlockInterface $block) |
||
316 | |||
317 | private function buildElements(GalleryInterface $gallery): array |
||
341 | |||
342 | private function getMediaType(MediaInterface $media): ?string |
||
353 | } |
||
354 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.