예제 #1
0
파일: Query.php 프로젝트: zaxxx/zaxcms
 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;
 }
예제 #2
0
파일: Service.php 프로젝트: zaxxx/zaxcms
 public function __construct(Kdyby\Doctrine\EntityManager $entityManager)
 {
     parent::__construct($entityManager);
     $this->entityClassName = Entity\User::getClassName();
 }