Ejemplo n.º 1
0
 /**
  * @param int $page
  * @param array $catalogNumbers
  * @param Request $request
  * @param ExportManager $exportManager
  * @param Collection $collection
  * @return array
  */
 private function getDataForDisplay($page, $catalogNumbers, $request, $exportManager, $collection)
 {
     $maxItemPerPage = $exportManager->getMaxItemPerPage($request);
     $paginator = $this->get('knp_paginator');
     $pagination = $paginator->paginate($catalogNumbers, $page, $maxItemPerPage);
     $catalogNumbers = $pagination->getItems();
     $diffs = $exportManager->getDiffsByCatalogNumbers($catalogNumbers);
     $specimens = [];
     $specimens['recolnat'] = $this->getDoctrine()->getRepository('AppBundle\\Entity\\Specimen')->findByCatalogNumbers($collection, $catalogNumbers, AbstractQuery::HYDRATE_OBJECT);
     $specimens['institution'] = $this->getDoctrine()->getRepository('AppBundle\\Entity\\Specimen', 'buffer')->findByCatalogNumbers($collection, $catalogNumbers, AbstractQuery::HYDRATE_OBJECT);
     return array($pagination, $diffs, $specimens);
 }
Ejemplo n.º 2
0
 public function testOrderDiffsByTaxon()
 {
     $this->if($diff = $this->exportManager->getDiffsByCatalogNumbers($this->catalogNumbers))->array($this->exportManager->orderDiffsByTaxon($diff));
 }
Ejemplo n.º 3
0
 /**
  * @return mixed
  */
 public function getStats()
 {
     return $this->exportManager->getDiffHandler()->getStatsFile()->getData();
 }