src/NodeVisitor/AbstractPathResolver.php
/**
     * Called before child nodes are visited.
     *
     * @param \Twig_NodeInterface $node The node to visit
     * @param \Twig_Environment   $env  The Twig environment instance
     *
     * @return \Twig_NodeInterface The modified node
     */
Called before child nodes are visited.
@param \Twig_NodeInterface $node The node to visit
@param \Twig_Environment   $env  The Twig environment instance

@return \Twig_NodeInterface The modified node
Called before child nodes are visited . @param \ Twig_NodeInterface $node The node to visit @param \ Twig_Environment $env The Twig environment instance @return \ Twig_NodeInterface The modified node
public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
    {
        if ($node instanceof \Twig_Node_Module && $node->hasAttribute('puli')) {
            $this->currentDir = Path::getDirectory($node->getAttribute('filename'));
        }
        return $node;
    }
public function enterNode ( \ Twig_NodeInterface $ node , \ Twig_Environment $ env ) { if ( $ node instanceof \ Twig_Node_Module && $ node -> hasAttribute ( 'puli' ) ) { $ this -> currentDir = Path :: getDirectory ( $ node -> getAttribute ( 'filename' ) ) ; } return $ node ; }
Called before child nodes are visited.
Called before child nodes are visited .
// Remember the directory of the current file // Currently, it doesn't seem like Twig does recursive traversals // (i.e. starting the traversal of another module while a previous // one is still in progress). Thus we don't need to track existing // values here.