1 | <?php |
||
21 | class CKEditorRenderer implements CKEditorRendererInterface |
||
22 | { |
||
23 | /** @var \Ivory\JsonBuilder\JsonBuilder */ |
||
24 | private $jsonBuilder; |
||
25 | |||
26 | /** @var \Symfony\Component\DependencyInjection\ContainerInterface */ |
||
27 | private $container; |
||
28 | |||
29 | /** |
||
30 | * Creates a CKEditor renderer. |
||
31 | * |
||
32 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The container. |
||
33 | */ |
||
34 | public function __construct(ContainerInterface $container) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function renderBasePath($basePath) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function renderJsPath($jsPath) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function renderWidget($id, array $config, array $options = array()) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function renderDestroy($id) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function renderPlugin($name, array $plugin) |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function renderStylesSet($name, array $stylesSet) |
||
129 | |||
130 | /** |
||
131 | * {@inheritdoc} |
||
132 | */ |
||
133 | public function renderTemplate($name, array $template) |
||
145 | |||
146 | /** |
||
147 | * Fixes the config language. |
||
148 | * |
||
149 | * @param array $config The config. |
||
150 | * |
||
151 | * @return array The fixed config. |
||
152 | */ |
||
153 | private function fixConfigLanguage(array $config) |
||
161 | |||
162 | /** |
||
163 | * Fixes the config contents css. |
||
164 | * |
||
165 | * @param array $config The config. |
||
166 | * |
||
167 | * @return array The fixed config. |
||
168 | */ |
||
169 | private function fixConfigContentsCss(array $config) |
||
182 | |||
183 | /** |
||
184 | * Fixes the config filebrowsers. |
||
185 | * |
||
186 | * @param array $config The config. |
||
187 | * |
||
188 | * @return array The fixed config. |
||
189 | */ |
||
190 | private function fixConfigFilebrowsers(array $config) |
||
234 | |||
235 | /** |
||
236 | * Fixes the config escaped values and sets them on the json builder. |
||
237 | * |
||
238 | * @param array $config The config. |
||
239 | */ |
||
240 | private function fixConfigEscapedValues(array $config) |
||
259 | |||
260 | /** |
||
261 | * Fixes the config constants. |
||
262 | * |
||
263 | * @param string $json The json config. |
||
264 | * |
||
265 | * @return string The fixed config. |
||
266 | */ |
||
267 | private function fixConfigConstants($json) |
||
271 | |||
272 | /** |
||
273 | * Fixes a path. |
||
274 | * |
||
275 | * @param string $path The path. |
||
276 | * |
||
277 | * @return string The fixed path. |
||
278 | */ |
||
279 | private function fixPath($path) |
||
287 | |||
288 | /** |
||
289 | * Fixes an url. |
||
290 | * |
||
291 | * @param string $url The url. |
||
292 | * |
||
293 | * @return string The fixed url. |
||
294 | */ |
||
295 | private function fixUrl($url) |
||
305 | |||
306 | /** |
||
307 | * Gets the assets helper. |
||
308 | * |
||
309 | * @return \Symfony\Component\Asset\Packages|\Symfony\Component\Templating\Helper\CoreAssetsHelper|null The assets helper. |
||
310 | */ |
||
311 | private function getAssetsHelper() |
||
315 | |||
316 | /** |
||
317 | * Gets the router. |
||
318 | * |
||
319 | * @return \Symfony\Component\Routing\RouterInterface The router. |
||
320 | */ |
||
321 | private function getRouter() |
||
325 | } |
||
326 |