1 | <?php |
||
29 | class MediaExtension extends AbstractExtension implements InitRuntimeInterface |
||
|
|||
30 | { |
||
31 | /** |
||
32 | * @var Pool |
||
33 | */ |
||
34 | protected $mediaService; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $resources = []; |
||
40 | |||
41 | /** |
||
42 | * @var ManagerInterface |
||
43 | */ |
||
44 | protected $mediaManager; |
||
45 | |||
46 | /** |
||
47 | * @var Environment |
||
48 | */ |
||
49 | protected $environment; |
||
50 | |||
51 | public function __construct(Pool $mediaService, ManagerInterface $mediaManager) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function getTokenParsers() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function initRuntime(Environment $environment): void |
||
76 | |||
77 | /** |
||
78 | * @param MediaInterface $media |
||
79 | * @param string $format |
||
80 | * @param array $options |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function media($media, $format, $options = []) |
||
106 | |||
107 | /** |
||
108 | * Returns the thumbnail for the provided media. |
||
109 | * |
||
110 | * @param MediaInterface $media |
||
111 | * @param string $format |
||
112 | * @param array $options |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | public function thumbnail($media, $format, $options = []) |
||
152 | |||
153 | /** |
||
154 | * @param string $template |
||
155 | * |
||
156 | * @return mixed |
||
157 | */ |
||
158 | public function render($template, array $parameters = []) |
||
166 | |||
167 | /** |
||
168 | * @param MediaInterface $media |
||
169 | * @param string $format |
||
170 | * |
||
171 | * @return string |
||
172 | */ |
||
173 | public function path($media, $format) |
||
188 | |||
189 | /** |
||
190 | * @return Pool |
||
191 | */ |
||
192 | public function getMediaService() |
||
196 | |||
197 | /** |
||
198 | * @param mixed $media |
||
199 | */ |
||
200 | private function getMedia($media): ?MediaInterface |
||
218 | } |
||
219 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.