src/AppBundle/Controller/ArticleController.php 1 location
|
@@ 43-53 (lines=11) @@
|
| 40 |
|
* @Method("GET") |
| 41 |
|
* @Template() |
| 42 |
|
*/ |
| 43 |
|
public function indexAction(Request $request) |
| 44 |
|
{ |
| 45 |
|
$em = $this->getDoctrine()->getManager(); |
| 46 |
|
$qb = $em->getRepository('AppBundle:Article')->getArticles(); |
| 47 |
|
$this->addQueryBuilderSort($qb, 'article'); |
| 48 |
|
$paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 5); |
| 49 |
|
|
| 50 |
|
return array( |
| 51 |
|
'paginator' => $paginator, |
| 52 |
|
); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Finds and displays a Article entity. |
src/AppBundle/Controller/InventoryController.php 1 location
|
@@ 46-59 (lines=14) @@
|
| 43 |
|
* @Method("GET") |
| 44 |
|
* @Template() |
| 45 |
|
*/ |
| 46 |
|
public function indexAction(Request $request) |
| 47 |
|
{ |
| 48 |
|
$em = $this->getDoctrine()->getManager(); |
| 49 |
|
$qb = $em->getRepository('AppBundle:Inventory')->getInventory(); |
| 50 |
|
|
| 51 |
|
$createForm = $this->createCreateForm('inventory_create'); |
| 52 |
|
|
| 53 |
|
$paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 5); |
| 54 |
|
|
| 55 |
|
return array( |
| 56 |
|
'paginator' => $paginator, |
| 57 |
|
'create_form' => $createForm->createView(), |
| 58 |
|
); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
/** |
| 62 |
|
* Finds and displays a Inventory entity. |
src/AppBundle/Controller/Settings/Divers/UnitStorageController.php 1 location
|
@@ 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. |
src/AppBundle/Controller/SupplierController.php 1 location
|
@@ 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')->getSuppliers(); |
| 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. |