src/MacroThumb.php
public function macroThumb(MacroNode $node, PhpWriter $writer)
    {
        if ($node->modifiers) {
            // accept dataStream modifier for base64
            if (Helpers::removeFilter($node->modifiers, 'dataStream')) {
                return $writer->write('$_fi=Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args); echo Latte\\Runtime\\Filters::dataStream(file_get_contents(__DIR__."/../../../".$_fi));');
            }
            throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
        }
        return $writer->write('echo Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args)');
    }
public function macroThumb(MacroNode $node, PhpWriter $writer)
    {
        if ($node->modifiers) {
            // accept dataStream modifier for base64
            if (Helpers::removeFilter($node->modifiers, 'dataStream')) {
                return $writer->write('$_fi=Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args); echo Latte\\Runtime\\Filters::dataStream(file_get_contents(__DIR__."/../../../".$_fi));');
            }
            throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
        }
        return $writer->write('echo Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args)');
    }
public function macroThumb ( MacroNode $ node , PhpWriter $ writer ) { if ( $ node -> modifiers ) { // accept dataStream modifier for base64 if ( Helpers :: removeFilter ( $ node -> modifiers , 'dataStream' ) ) { return $ writer -> write ( '$_fi=Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args); echo Latte\\Runtime\\Filters::dataStream(file_get_contents(__DIR__."/../../../".$_fi));' ) ; } throw new CompileException ( 'Modifiers are not allowed in ' . $ node -> getNotation ( ) ) ; } return $ writer -> write ( 'echo Thumbnail\\Thumbnail::getSrcPath(%node.word, %node.args)' ) ; }
Macro thumb.

@param MacroNode $node
@param PhpWriter $writer
@return string
@throws CompileException
Macro thumb .