| @@ 41-49 (lines=9) @@ | ||
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | */ |
|
| 41 | public function indexAction(Request $request) |
|
| 42 | { |
|
| 43 | $em = $this->getDoctrine()->getManager(); |
|
| 44 | $qb = $em->getRepository('AppBundle:UnitStorage')->createQueryBuilder('u'); |
|
| 45 | $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20); |
|
| 46 | return array( |
|
| 47 | 'paginator' => $paginator, |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Finds and displays a UnitStorage entity. |
|
| @@ 41-51 (lines=11) @@ | ||
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | */ |
|
| 41 | public function indexAction(Request $request) |
|
| 42 | { |
|
| 43 | $em = $this->getDoctrine()->getManager(); |
|
| 44 | $qb = $em->getRepository('AppBundle:Supplier')->createQueryBuilder('s'); |
|
| 45 | $this->addQueryBuilderSort($qb, 'supplier'); |
|
| 46 | $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20); |
|
| 47 | ||
| 48 | return array( |
|
| 49 | 'paginator' => $paginator, |
|
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Finds and displays a Supplier entity. |
|