Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
BlockReferenceNode example
else
{
$body
=
new
Node
(
[
new
PrintNode
(
$this
->parser->
getExpressionParser
(
)
->
parseExpression
(
)
,
$lineno
)
,
]
)
;
}
$stream
->
expect
(
/* Token::BLOCK_END_TYPE */ 3
)
;
$block
->
setNode
(
'body',
$body
)
;
$this
->parser->
popBlockStack
(
)
;
$this
->parser->
popLocalScope
(
)
;
return
new
BlockReferenceNode
(
$name
,
$lineno
,
$this
->
getTag
(
)
)
;
}
public
function
decideBlockEnd
(
Token
$token
)
: bool
{
return
$token
->
test
(
'endblock'
)
;
}
public
function
getTag
(
)
: string
{
return
'block';
}
}