Contents

Cms\Twig\TokenParser\PutTokenParser

Overview

PutTokenParser for the {% put %} Twig tag.

Example usage:

{% put head %}
    <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"/>
{% endput %}
Extends
  • Twig\TokenParser\AbstractTokenParser
Implements
  • Twig\TokenParser\TokenParserInterface

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $parser - (defined in Twig\TokenParser\AbstractTokenParser)

Public Methods

public decidePutEnd()

public decidePutEnd($token): void

decidePutEnd determines if the token marks the end of the put block.

public getTag()

public getTag(): string 

getTag returns the tag name associated with this token parser.

public parse()

public parse($token): PutNode 

parse a token and returns a node.

Show inherited public methods

Inherited Public Methods

  • isAlwaysAllowedInSandbox() - (defined in Twig\TokenParser\AbstractTokenParser)
  • setParser() - (defined in Twig\TokenParser\AbstractTokenParser)

Protected Methods

protected parseMultitargetExpression()

protected parseMultitargetExpression(): Twig\Node\Nodes 

Show inherited protected methods

Inherited Protected Methods

  • parseAssignmentExpression() - Parses an assignment expression like "a, b". (defined in Twig\TokenParser\AbstractTokenParser)