Guest User

Untitled

a guest
Jan 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $disabilityType = $this->getDoctrine()->getRepository("AldenBonBundle:DisabilityType")->findAll();
  2.  
  3. $item = new AldenBonBundleEntityDisabilityType();
  4. $item->setAsAll();//set name and id
  5. array_unshift($disabilityType, $item);
  6.  
  7. $disabilityType = $this->getDoctrine()->getEntityManager()->merge($item);
  8.  
  9. $query = $entityManager
  10. ->createQuery('SELECT d FROM AldenBonBundleDisabilityType d');
  11. $disabilityTypes = $query->getResult(Query::HYDRATE_ARRAY);
Add Comment
Please, Sign In to add comment