Exemple #1
0
 protected function doCreateQuery(Kdyby\Persistence\Queryable $repository)
 {
     $qb = $repository->createQueryBuilder()->select('a, b, c')->from(Model\CMS\Entity\User::getClassName(), 'a')->join('a.role', 'b')->join('a.login', 'c');
     $this->applyFilters($qb);
     $query = $qb->getQuery()->useResultCache(TRUE, NULL, Model\CMS\AclFactory::CACHE_TAG);
     if ($this->locale !== NULL) {
         $query->setHint(Gedmo\Translatable\TranslatableListener::HINT_TRANSLATABLE_LOCALE, $this->locale);
     }
     return $query;
 }
Exemple #2
0
 public function __construct(Kdyby\Doctrine\EntityManager $entityManager)
 {
     parent::__construct($entityManager);
     $this->entityClassName = Entity\User::getClassName();
 }