Doctrine\ODM\MongoDB\DocumentRepository::createQueryBuilder PHP Метод

createQueryBuilder() публичный Метод

Creates a new Query\Builder instance that is preconfigured for this document name.
public createQueryBuilder ( ) : Builder
Результат Doctrine\ODM\MongoDB\Query\Builder $qb
    public function createQueryBuilder()
    {
        return $this->dm->createQueryBuilder($this->documentName);
    }

Usage Example

Пример #1
0
 public function findVisible($owner)
 {
     if (!$owner instanceof UserInterface) {
         return array();
     }
     $qb = $this->repo->createQueryBuilder()->field('owner.$id')->equals(new \MongoId($owner->getId()))->field('visibility')->equals(CalendarInterface::VISIBILITY_PUBLIC);
     return $qb->getQuery()->execute();
 }
All Usage Examples Of Doctrine\ODM\MongoDB\DocumentRepository::createQueryBuilder