Mercurial > hg > dml-open-vis
annotate 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 |
rev | line source |
---|---|
Daniel@0 | 1 <?php |
Daniel@0 | 2 |
Daniel@0 | 3 namespace Kachkaev\JstmplBundle\Twig; |
Daniel@0 | 4 |
Daniel@0 | 5 class JstmplNode extends \Twig_Node |
Daniel@0 | 6 { |
Daniel@0 | 7 public function __construct($id, \Twig_Node $body, $lineno) |
Daniel@0 | 8 { |
Daniel@0 | 9 parent::__construct(array('body' => $body), array('id' => $id), $lineno); |
Daniel@0 | 10 } |
Daniel@0 | 11 |
Daniel@0 | 12 public function compile(\Twig_Compiler $compiler) |
Daniel@0 | 13 { |
Daniel@0 | 14 $compiler->addDebugInfo($this); |
Daniel@0 | 15 $compiler->write(" echo \"<script id=\\\"".$this->getAttribute('id')."\\\" type=\\\"text/html\\\">\";\n"); |
Daniel@0 | 16 $compiler->subcompile($this->getNode('body')); |
Daniel@0 | 17 $compiler->write(" echo \"</script>\\n\\n\";\n"); |
Daniel@0 | 18 } |
Daniel@0 | 19 } |