public function getSortedQuestions()
    {
        $criteria = Criteria::create();
        $criteria->orderBy(array('rank' => 'ASC'));

        return $this->getQuestions()->matching($criteria);
    }
public function getSortedQuestions()
    {
        $criteria = Criteria::create();
        $criteria->orderBy(array('rank' => 'ASC'));

        return $this->getQuestions()->matching($criteria);
    }
public function getSortedQuestions ( ) { $ criteria = Criteria :: create ( ) ; $ criteria -> orderBy ( array ( 'rank' => 'ASC' ) ) ; return $ this -> getQuestions ( ) -> matching ( $ criteria ) ; }
Get Sorted questions by Rank

@return \Doctrine\Common\Collections\Collection
Get Sorted questions by Rank