| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | public function parse(Twig_Token $token) |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * @var Twig_Node_BlockReference $blockReference |
||
| 32 | */ |
||
| 33 | $blockReference = parent::parse($token); |
||
| 34 | $block = $this->parser->getBlock($blockReference->getAttribute('name')); |
||
| 35 | |||
| 36 | // prepare block |
||
| 37 | $this->removeTextNodesRecursively($block); |
||
| 38 | $this->fixMacroCallsRecursively($block); |
||
| 39 | |||
| 40 | // mark for syntax checks |
||
| 41 | foreach ($block->getIterator() as $node) { |
||
| 42 | if ($node instanceof Twig_Node_Block) { |
||
| 43 | $node->setAttribute('twigExcelBundle', true); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | return $blockReference; |
||
| 48 | } |
||
| 49 | |||
| 67 |