Cms\Twig\PlaceholderTokenParser

Source: ~/modules/cms/twig/PlaceholderTokenParser.php

Extends:

  • Twig_TokenParser

Implements:

  • Twig_TokenParserInterface

Parser for the {% placeholder %} Twig tag.

{% 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 %}

Protected properties

There are no protected properties in the class.

Show inherited protected properties

Inherited protected properties

  • protected Twig_Parser $parser - defined in Twig_TokenParser.

Public methods

public void decidePlaceholderEnd($token)
Parameters
  • $token

public string getTag()

Gets the tag name associated with this token parser.

public TwigNode parse(TwigToken $token)

Parses a token and returns a node.

Parameters
  • TwigToken $token - A TwigToken instance

Show inherited public methods

Inherited public methods

  • public void setParser($parser) - defined in Twig_TokenParser. Sets the parser associated with this token parser.

Protected methods

protected void loadParams($stream)
Parameters
  • $stream