public function AllProject()
 {
     $us = new ProjectController();
     $em = $this->getDoctrine()->getManager();
     $project = $us->getAllProject($em);
     $projects = array();
     foreach ($project as $value) {
         $arr = (array) $value;
         $projectId = array_shift($arr);
         $projectName = array_shift($arr);
         $projects += [$projectId => $projectName];
     }
     return $projects;
 }
Exemple #2
0
 /**
  * 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()));
 }
Exemple #3
0
 public function newInProjectAction($id)
 {
     $entity = new Issue();
     $form = $this->createCreateIssueInProjectForm($entity, $id);
     $projObj = new ProjectController();
     $em = $this->getDoctrine()->getManager();
     $project = $projObj->getOneProject($em, $id);
     return $this->render('ErpBundle:Issue:new.html.twig', array('entity' => $entity, 'project' => $project->getProjectName(), 'projectId' => $project->getId(), 'form' => $form->createView()));
 }