Mercurial > hg > dml-open-vis
comparison src/Kachkaev/JstmplBundle/Twig/JstmplNode.php @ 0:493bcb69166c
added public content
author | Daniel Wolff |
---|---|
date | Tue, 09 Feb 2016 20:54:02 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:493bcb69166c |
---|---|
1 <?php | |
2 | |
3 namespace Kachkaev\JstmplBundle\Twig; | |
4 | |
5 class JstmplNode extends \Twig_Node | |
6 { | |
7 public function __construct($id, \Twig_Node $body, $lineno) | |
8 { | |
9 parent::__construct(array('body' => $body), array('id' => $id), $lineno); | |
10 } | |
11 | |
12 public function compile(\Twig_Compiler $compiler) | |
13 { | |
14 $compiler->addDebugInfo($this); | |
15 $compiler->write(" echo \"<script id=\\\"".$this->getAttribute('id')."\\\" type=\\\"text/html\\\">\";\n"); | |
16 $compiler->subcompile($this->getNode('body')); | |
17 $compiler->write(" echo \"</script>\\n\\n\";\n"); | |
18 } | |
19 } |