Documentation

AsseticTokenParser extends Twig_TokenParser
in package

Base class for all token parsers.

Table of Contents

$parser  : Parser
$extensions  : mixed
$factory  : mixed
$output  : mixed
$single  : mixed
$tag  : mixed
__construct()  : mixed
Constructor.
getTag()  : mixed
parse()  : mixed
setParser()  : mixed
Sets the parser associated with this token parser.
testEndTag()  : mixed
createBodyNode()  : Twig_Node
createNode()  : Twig_Node

Properties

Methods

__construct()

Constructor.

public __construct(AssetFactory $factory, string $tag, string $output[, bool $single = false ][, array<string|int, mixed> $extensions = array() ]) : mixed

Attributes can be added to the tag by passing names as the options array. These values, if found, will be passed to the factory and node.

Parameters
$factory : AssetFactory

The asset factory

$tag : string

The tag name

$output : string

The default output string

$single : bool = false

Whether to force a single asset

$extensions : array<string|int, mixed> = array()

Additional attribute names to look for

Return values
mixed

setParser()

Sets the parser associated with this token parser.

public setParser(Parser $parser) : mixed
Parameters
$parser : Parser
Return values
mixed

createBodyNode()

protected createBodyNode(AssetInterface $asset, Twig_Node $body, array<string|int, mixed> $inputs, array<string|int, mixed> $filters, string $name[, array<string|int, mixed> $attributes = array() ], int $lineno[, string $tag = null ]) : Twig_Node
Parameters
$asset : AssetInterface
$body : Twig_Node
$inputs : array<string|int, mixed>
$filters : array<string|int, mixed>
$name : string
$attributes : array<string|int, mixed> = array()
$lineno : int
$tag : string = null
Return values
Twig_Node

createNode()

protected createNode(AssetInterface $asset, Twig_NodeInterface $body, array<string|int, mixed> $inputs, array<string|int, mixed> $filters, string $name[, array<string|int, mixed> $attributes = array() ], int $lineno[, string $tag = null ]) : Twig_Node
Parameters
$asset : AssetInterface
$body : Twig_NodeInterface
$inputs : array<string|int, mixed>
$filters : array<string|int, mixed>
$name : string
$attributes : array<string|int, mixed> = array()
$lineno : int
$tag : string = null
Tags
deprecated

since 1.3.0, to be removed in 2.0. Use createBodyNode instead.

Return values
Twig_Node

Search results