public function indexAction()
 {
     $mainLayout = $this->initializeAdminArea();
     $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');
     $page = $this->params()->fromRoute('page');
     $lang = $this->params()->fromRoute('lang');
     $perPage = $this->params()->fromRoute('perpage');
     $wrapper = new StatoCivileSezioniGetterWrapper(new StatoCivileSezioniGetter($em));
     $wrapper->setInput(array('orderBy' => 'scs.id DESC'));
     $wrapper->setupQueryBuilder();
     $wrapper->setupPaginator($wrapper->setupQuery($em));
     $wrapper->setupPaginatorCurrentPage(isset($page) ? $page : null);
     $wrapper->setupPaginatorItemsPerPage(isset($perPage) ? $perPage : null);
     $paginator = $wrapper->getPaginator();
     $paginatorCount = $paginator->getTotalItemCount();
     $this->layout()->setVariables(array('tableTitle' => 'Sezioni', 'tableDescription' => $paginatorCount . ' sezioni stato civile in archivio', 'columns' => array("Nome", "Data inserimento", "Data ultimo aggiornamento", " ", " "), 'paginator' => $paginator, 'total_item_count' => $paginatorCount, 'records' => $this->formatRecords($wrapper->setupRecords()), 'formBreadCrumbCategory' => 'Stato civile', 'templatePartial' => self::summaryTemplate, 'formBreadCrumbCategoryLink' => $this->url()->fromRoute('admin/stato-civile-summary', array('lang' => $lang))));
     $this->layout()->setTemplate($mainLayout);
 }
 public function testSetupQueryBuilder()
 {
     $this->assertNull($this->objectWrapper->setupQueryBuilder());
 }