ContentTokenParser

Parser for the {% content %} Twig tag.

 class Cms\Twig\ContentTokenParser
extends Twig\TokenParser\AbstractTokenParser

{% content "intro.htm" %}

{% content "intro.md" name='John' %}

{% content "intro/txt" name='John', year=2013 %}

Extends

Methods

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 Description
$token
Twig\Token

A TwigToken instance

Returns
TwigNode

A TwigNode instance

Copyright © 2024 Winter CMS