interface NodeVisitorInterface
Interface for node visitor classes.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- interface \Twig\NodeVisitor\NodeVisitorInterface
Expanded class hierarchy of NodeVisitorInterface
All classes that implement NodeVisitorInterface
10 files declare their use of NodeVisitorInterface
- ComponentNodeVisitor.php in core/
lib/ Drupal/ Core/ Template/ ComponentNodeVisitor.php - Environment.php in vendor/
twig/ twig/ src/ Environment.php - ExtensionInterface.php in vendor/
twig/ twig/ src/ Extension/ ExtensionInterface.php - ExtensionSet.php in vendor/
twig/ twig/ src/ ExtensionSet.php - NodeTraverser.php in vendor/
twig/ twig/ src/ NodeTraverser.php
File
-
vendor/
twig/ twig/ src/ NodeVisitor/ NodeVisitorInterface.php, line 22
Namespace
Twig\NodeVisitorView source
interface NodeVisitorInterface {
/**
* Called before child nodes are visited.
*
* @return Node The modified node
*/
public function enterNode(Node $node, Environment $env) : Node;
/**
* Called after child nodes are visited.
*
* @return Node|null The modified node or null if the node must be removed
*/
public function leaveNode(Node $node, Environment $env) : ?Node;
/**
* Returns the priority for this visitor.
*
* Priority should be between -10 and 10 (0 is the default).
*
* @return int The priority level
*/
public function getPriority();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
NodeVisitorInterface::enterNode | public | function | Called before child nodes are visited. | 11 |
NodeVisitorInterface::getPriority | public | function | Returns the priority for this visitor. | 10 |
NodeVisitorInterface::leaveNode | public | function | Called after child nodes are visited. | 11 |