PlaceholderTokenParser
Parser for the {% placeholder %}
Twig tag.
{% placeholder %}
Twig tag. class Cms\Twig\PlaceholderTokenParser
extends Twig\TokenParser\AbstractTokenParser
{% placeholder head %}
or - use default placeholder content
{% placeholder head %}
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"/>
{% endshowblock %}
Extends
Class | Description |
---|---|
Twig\TokenParser\AbstractTokenParser
|
Methods
public decidePlaceholderEnd (Twig\Token $token)
Parameters
Property | Type | Description |
---|---|---|
$token | Twig\Token |
Twig\Token
|
Returns
mixed
public getTag () : string
Gets the tag name associated with this token parser.
Returns
string
The tag name
public parse (Twig\Token $token) : TwigNode
Parses a token and returns a node.
Parameters
Property | Type | Description |
---|---|---|
$token | Twig\Token |
Twig\Token
A TwigToken instance |
Returns
TwigNode
A TwigNode instance
protected loadParams ($stream)
Parameters
Property | Type | Description |
---|---|---|
$stream | mixed |
mixed
|
Returns
mixed
Copyright © 2024 Winter CMS