Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @Route("/", name="portadaParkings")
- * @Route("/{ciudad}/{tipo}/",
- * name="filtrarParkings")
- * @Template()
- */
- public function portadaAction($ciudad, $tipo)
- {
- $uri = $this->container->get('request')->getPathInfo();
- if ($ciudad && $tipo)
- {
- $query = $this->parkingsRepository()->filtrarParking($ciudad, $tipo);
- }else{
- $query = $this->parkingsRepository()->parkings();
- }
- $paginator = $this->get('knp_paginator');
- $parkings = $paginator->paginate(
- $query,
- $this->get('request')->query->get('page', 1)/*page number*/,
- 10/*limit per page*/
- );
- return array('parkings' => $parkings,
- 'tipo' =>$tipo,
- 'ciudad' => $ciudad,
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement