core/twig/tag/PageTokenParser.php
public function parse(\Twig_Token $token) {

        $lineno = $token->getLine();

        $nodes['criteria'] = $this->parser->getExpressionParser()->parseExpression();
        $this->parser->getStream()->expect('as');
        $targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
        $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);

        $nodes['body'] = $this->parser->subparse(array($this, 'endOfTag'), true);
        $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);

        $elementsTarget = $targets->getNode(0);
        $nodes['elementsTarget'] = new \Twig_Node_Expression_AssignName($elementsTarget->getAttribute('name'), $elementsTarget->getLine());

        return new PageNode($nodes, array(), $lineno, $this->getTag());

    }
public function parse(\Twig_Token $token) {

        $lineno = $token->getLine();

        $nodes['criteria'] = $this->parser->getExpressionParser()->parseExpression();
        $this->parser->getStream()->expect('as');
        $targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
        $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);

        $nodes['body'] = $this->parser->subparse(array($this, 'endOfTag'), true);
        $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);

        $elementsTarget = $targets->getNode(0);
        $nodes['elementsTarget'] = new \Twig_Node_Expression_AssignName($elementsTarget->getAttribute('name'), $elementsTarget->getLine());

        return new PageNode($nodes, array(), $lineno, $this->getTag());

    }
public function parse ( \ Twig_Token $ token ) { $ lineno = $ token -> getLine ( ) ; $ nodes [ 'criteria' ] = $ this -> parser -> getExpressionParser ( ) -> parseExpression ( ) ; $ this -> parser -> getStream ( ) -> expect ( 'as' ) ; $ targets = $ this -> parser -> getExpressionParser ( ) -> parseAssignmentExpression ( ) ; $ this -> parser -> getStream ( ) -> expect ( \ Twig_Token :: BLOCK_END_TYPE ) ; $ nodes [ 'body' ] = $ this -> parser -> subparse ( array ( $ this , 'endOfTag' ) , true ) ; $ this -> parser -> getStream ( ) -> expect ( \ Twig_Token :: BLOCK_END_TYPE ) ; $ elementsTarget = $ targets -> getNode ( 0 ) ; $ nodes [ 'elementsTarget' ] = new \ Twig_Node_Expression_AssignName ( $ elementsTarget -> getAttribute ( 'name' ) , $ elementsTarget -> getLine ( ) ) ; return new PageNode ( $ nodes , array ( ) , $ lineno , $ this -> getTag ( ) ) ; }
Define how our page tag should be parsed.


@param \Twig_Token $token An instance of a \Twig_Token.

@return \Disco\twig\PageNode
Define how our page tag should be parsed .