Latte\Macros\CoreMacros::macroIfContent PHP Method

macroIfContent() public method

n:ifcontent
public macroIfContent ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter
    public function macroIfContent(MacroNode $node, PhpWriter $writer)
    {
        if (!$node->prefix || $node->prefix !== MacroNode::PREFIX_NONE) {
            throw new CompileException('Unknown ' . $node->getNotation() . ", use n:{$node->name} attribute.");
        }
    }