public function findByPerimeter(Perimeter $perimeter)
    {
        $qb = $this->createQueryBuilder('s');
        $qb->where("s.perimeter = :perimeter")
            ->setParameter('perimeter', $perimeter)
            ->orderBy('s.startDate', 'DESC')
        ;

        return $qb->getQuery()->getResult();
    }
public function findByPerimeter(Perimeter $perimeter)
    {
        $qb = $this->createQueryBuilder('s');
        $qb->where("s.perimeter = :perimeter")
            ->setParameter('perimeter', $perimeter)
            ->orderBy('s.startDate', 'DESC')
        ;

        return $qb->getQuery()->getResult();
    }
public function findByPerimeter ( Perimeter $ perimeter ) { $ qb = $ this -> createQueryBuilder ( 's' ) ; $ qb -> where ( "s.perimeter = :perimeter" ) -> setParameter ( 'perimeter' , $ perimeter ) -> orderBy ( 's.startDate' , 'DESC' ) ; return $ qb -> getQuery ( ) -> getResult ( ) ; }
Find Seasons by perimeter and order by start date

@param Perimeter $perimeter The perimeter

@return Doctrine\Common\Collections\Collection Collection of seasons
Find Seasons by perimeter and order by start date