Exemplo n.º 1
0
 function setUser(User $user)
 {
     $this->user = $user->getId();
 }
Exemplo n.º 2
0
 /**
  * @param User $user
  *
  * @return Doctrine\Common\Collections\Collection
  */
 public function findRunningBuildsByUser(User $user)
 {
     $query = $this->createQueryBuilder('b')->select('b')->leftJoin('b.project', 'p')->leftJoin('p.users', 'u')->where('u.id = ?1')->andWhere('b.status = ?2')->orderBy('b.createdAt', 'DESC')->setParameters([1 => $user->getId(), 2 => Build::STATUS_RUNNING])->getQuery();
     return $query->getResult();
 }