MailPartialTokenParser

Parser for the {% partial %} Twig tag.

class System\Twig\MailPartialTokenParser
extends Twig\TokenParser\AbstractTokenParser
PHP

{% partial "sidebar" %}

{% partial "sidebar" name='John' %}

{% partial "sidebar" name='John', year=2013 %}

Extends

Methods

public decidePartialEnd (Twig\Token $token)

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

A TwigToken instance

Returns
TwigNode

A TwigNode instance

Copyright © 2024 Winter CMS