1 | <?php |
||
20 | class CKEditorRenderer implements CKEditorRendererInterface |
||
21 | { |
||
22 | /** @var \Ivory\JsonBuilder\JsonBuilder */ |
||
23 | private $jsonBuilder; |
||
24 | |||
25 | /** @var \Symfony\Component\DependencyInjection\ContainerInterface */ |
||
26 | private $container; |
||
27 | |||
28 | /** |
||
29 | * Creates a CKEditor renderer. |
||
30 | * |
||
31 | * @param \Symfony\Component\DependencyInjection\ContainerInterface $container The container. |
||
32 | */ |
||
33 | public function __construct(ContainerInterface $container) |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function renderBasePath($basePath) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function renderJsPath($jsPath) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function renderWidget($id, array $config, array $options = array()) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function renderDestroy($id) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function renderPlugin($name, array $plugin) |
||
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function renderStylesSet($name, array $stylesSet) |
||
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | public function renderTemplate($name, array $template) |
||
144 | |||
145 | /** |
||
146 | * Fixes the config language. |
||
147 | * |
||
148 | * @param array $config The config. |
||
149 | * |
||
150 | * @return array The fixed config. |
||
151 | */ |
||
152 | private function fixConfigLanguage(array $config) |
||
160 | |||
161 | /** |
||
162 | * Fixes the config contents css. |
||
163 | * |
||
164 | * @param array $config The config. |
||
165 | * |
||
166 | * @return array The fixed config. |
||
167 | */ |
||
168 | private function fixConfigContentsCss(array $config) |
||
181 | |||
182 | /** |
||
183 | * Fixes the config filebrowsers. |
||
184 | * |
||
185 | * @param array $config The config. |
||
186 | * |
||
187 | * @return array The fixed config. |
||
188 | */ |
||
189 | private function fixConfigFilebrowsers(array $config) |
||
227 | |||
228 | /** |
||
229 | * Fixes the config escaped values and sets them on the json builder. |
||
230 | * |
||
231 | * @param array $config The config. |
||
232 | */ |
||
233 | private function fixConfigEscapedValues(array $config) |
||
252 | |||
253 | /** |
||
254 | * Fixes the config constants. |
||
255 | * |
||
256 | * @param string $json The json config. |
||
257 | * |
||
258 | * @return string The fixed config. |
||
259 | */ |
||
260 | private function fixConfigConstants($json) |
||
264 | |||
265 | /** |
||
266 | * Fixes a path. |
||
267 | * |
||
268 | * @param string $path The path. |
||
269 | * |
||
270 | * @return string The fixed path. |
||
271 | */ |
||
272 | private function fixPath($path) |
||
280 | |||
281 | /** |
||
282 | * Fixes an url. |
||
283 | * |
||
284 | * @param string $url The url. |
||
285 | * |
||
286 | * @return string The fixed url. |
||
287 | */ |
||
288 | private function fixUrl($url) |
||
298 | |||
299 | /** |
||
300 | * Gets the assets helper. |
||
301 | * |
||
302 | * @return \Symfony\Component\Asset\Packages|\Symfony\Component\Templating\Helper\CoreAssetsHelper|null The assets helper. |
||
303 | */ |
||
304 | private function getAssetsHelper() |
||
308 | |||
309 | /** |
||
310 | * Gets the router. |
||
311 | * |
||
312 | * @return \Symfony\Component\Routing\RouterInterface The router. |
||
313 | */ |
||
314 | private function getRouter() |
||
318 | } |
||
319 |