コード例 #1
0
ファイル: IssueController.php プロジェクト: Gordondalos/erp
 public function Alluser()
 {
     $us = new UsersController();
     $em = $this->getDoctrine()->getManager();
     $user = $us->getAllUserAction($em);
     $users = array();
     foreach ($user as $value) {
         $UserId = $value->getId();
         $UserName = $value->getUsername();
         $users += [$UserId => $UserName];
     }
     return $users;
 }
コード例 #2
0
ファイル: ClientController.php プロジェクト: Gordondalos/erp
 /**
  * Finds and displays a Client entity.
  *
  */
 public function showAction($id)
 {
     $em = $this->getDoctrine()->getManager();
     $entity = $em->getRepository('ErpBundle:Client')->find($id);
     if (!$entity) {
         throw $this->createNotFoundException('Unable to find Client entity.');
     }
     $deleteForm = $this->createDeleteForm($id);
     $ProjectObject = new ProjectController();
     $clientProject = $ProjectObject->getClientProject($em, $id);
     $userObject = new UsersController();
     $users = $userObject->getAllUserAction($em);
     //var_dump($users);
     return $this->render('ErpBundle:Client:show.html.twig', array('entity' => $entity, 'clientProject' => $clientProject, 'users' => $users, 'delete_form' => $deleteForm->createView()));
 }