Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * AutoComplete Action
- *
- * @Route("/auto", name="individuos_auto")
- *
- */
- public function autocompleteAction()
- {
- $em = $this->getDoctrine()->getEntityManager();
- $qb = $em->createQueryBuilder();
- $entities = $em->getRepository('AcmeParqueBundle:Especies')->findAll();
- foreach ($entities as $entity) {
- $array[] = $entity->getNombrecomun();
- }
- return $this->render('AcmeParqueBundle:Main:searchresults.html.twig',array('resultados',json_encode($array)));
- }
Add Comment
Please, Sign In to add comment