Exemple #1
0
 /**
  * After action
  *
  * Save the current cycle,progra, and application
  */
 public function afterAction()
 {
     if ($this->_program) {
         $this->_store->currentProgramId = $this->_program->getId();
     }
     if ($this->_cycle) {
         $this->_store->currentCycleId = $this->_cycle->getId();
     }
     parent::afterAction();
 }
Exemple #2
0
 /**
  * find all users in a program
  *
  * @param \Jazzee\Entity\Program $program
  *
  * @return Doctrine\Common\Collections\Collection \Jazzee\Entity\User
  */
 public function findByProgram($program)
 {
     $query = $this->_em->createQuery('SELECT u FROM Jazzee\\Entity\\User u JOIN u.roles r WHERE r.program = :programId AND u.isActive = true ORDER BY u.lastName, u.firstName');
     $query->setParameter('programId', $program->getId());
     return $query->getResult();
 }