Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function highlightDemoAction() |
||
26 | { |
||
27 | $root = dirname($this->get('kernel') |
||
28 | ->locateResource('@MesHighlightBundle/MesHighlightBundle.php')); |
||
29 | |||
30 | // Change root path for "code files". |
||
31 | $this->get('mes_highlight.highlighter') |
||
32 | ->setRootPath($root); |
||
33 | |||
34 | // Add js language for highlighting. |
||
35 | $this->get('mes_highlight.highlighter') |
||
36 | ->addSupportedLanguages(array( |
||
37 | 'js', |
||
38 | 'xml', |
||
39 | 'http', |
||
40 | )); |
||
41 | |||
42 | $content = '{{Resources/demo/demo.php}}'; |
||
43 | |||
44 | return $this->render('MesHighlightBundle::demo.html.twig', array( |
||
45 | 'content' => $content, |
||
46 | )); |
||
47 | } |
||
48 | } |
||
49 |