public function retrieveForTemplate(Template $template)
    {
        return $this->toEntityCollection(
            $this->getEntityRepository()
                ->createQueryBuilder('zone')
                    ->select('zone', 'components')
                        ->leftJoin('zone.components', 'components')
                    ->where('zone.template = :template')
                        ->setParameter(':template', $template)
                    ->addOrderBy('components.ranking', 'asc')
                ->getQuery()
                    ->getResult()
        );
    }