GetAttrAdjuster

Type
Class
Namespace
craft\web\twig\nodevisitors
Inherits
craft\web\twig\nodevisitors\GetAttrAdjuster
Implements
Twig_NodeVisitorInterface
Since
3.0

GetAttrAdjuster swaps Twig_Node_Expression_GetAttr nodes with craft\web\twig\nodes\GetAttrNode nodes.

View source

Public Methods

MethodDescription
enterNode()Called before child nodes are visited.
getPriority()Returns the priority for this visitor.
leaveNode()Called after child nodes are visited.

enterNode()

Called before child nodes are visited.

View source

Arguments

  • $node
  • $env

Returns

Twig_Node – The modified node

Signature

public Twig_Node enterNode ( Twig_Node $node, Twig_Environment $env )

getPriority()

Returns the priority for this visitor.

Priority should be between -10 and 10 (0 is the default).

View source

Returns

integer – The priority level

Signature

public integer getPriority ( )

leaveNode()

Called after child nodes are visited.

View source

Arguments

  • $node
  • $env

Returns

Twig_Node, false – The modified node or false if the node must be removed

Signature

public Twig_Node, false leaveNode ( Twig_Node $node, Twig_Environment $env )