winter/modules/cms/twig/DefaultNode.php

32 lines
682 B
PHP
Raw Normal View History

2014-05-14 23:24:20 +10:00
<?php namespace Cms\Twig;
use Twig\Node\Node as TwigNode;
use Twig\Compiler as TwigCompiler;
2014-05-14 23:24:20 +10:00
/**
* Represents a "default" node
*
* @package october\cms
* @author Alexey Bobkov, Samuel Georges
*/
class DefaultNode extends TwigNode
2014-05-14 23:24:20 +10:00
{
public function __construct($lineno, $tag = 'default')
{
parent::__construct([], [], $lineno, $tag);
}
/**
* Compiles the node to PHP.
*
* @param TwigCompiler $compiler A TwigCompiler instance
2014-05-14 23:24:20 +10:00
*/
public function compile(TwigCompiler $compiler)
2014-05-14 23:24:20 +10:00
{
$compiler
->addDebugInfo($this)
->write("echo '<!-- X_OCTOBER_DEFAULT_BLOCK_CONTENT -->';\n")
;
}
2014-10-11 01:42:04 +02:00
}