Documentation

SpacelessTokenParser extends AbstractTokenParser
in package

Remove whitespaces between HTML tags.

{% spaceless %}

foo
{% endspaceless %} {# output will be
foo
#}
Tags
deprecated

since Twig 2.7, to be removed in 3.0 (use the "spaceless" filter with the "apply" tag instead)

Table of Contents

$parser  : Parser
decideSpacelessEnd()  : mixed
getTag()  : mixed
parse()  : mixed
setParser()  : mixed
Sets the parser associated with this token parser.

Properties

Methods

setParser()

Sets the parser associated with this token parser.

public setParser(Parser $parser) : mixed
Parameters
$parser : Parser
Return values
mixed

Search results