/**
  * Returns the list of all Bistum entities
  */
 public function listAction()
 {
     if ($this->request->getFormat() === 'json') {
         $this->view->setVariablesToRender(['bistum']);
     }
     $searchArr = [];
     if ($this->request->hasArgument('columns')) {
         $columns = $this->request->getArgument('columns');
         foreach ($columns as $column) {
             if (!empty($column['data']) && !empty($column['search']['value'])) {
                 $searchArr[$column['data']] = $column['search']['value'];
             }
         }
     }
     if ($this->request->hasArgument('order')) {
         $order = $this->request->getArgument('order');
         if (!empty($order)) {
             $orderDir = $order[0]['dir'];
             $orderById = $order[0]['column'];
             if (!empty($orderById)) {
                 $columns = $this->request->getArgument('columns');
                 $orderBy = $columns[$orderById]['data'];
             }
         }
     }
     if ($this->request->hasArgument('draw')) {
         $draw = $this->request->getArgument('draw');
     } else {
         $draw = 0;
     }
     $start = $this->request->hasArgument('start') ? $this->request->getArgument('start') : self::start;
     $length = $this->request->hasArgument('length') ? $this->request->getArgument('length') : self::length;
     if (empty($searchArr)) {
         if (isset($orderBy) && !empty($orderBy) && (isset($orderDir) && !empty($orderDir))) {
             if ($orderDir === 'asc') {
                 $orderArr = [$orderBy => \TYPO3\Flow\Persistence\QueryInterface::ORDER_ASCENDING];
             } elseif ($orderDir === 'desc') {
                 $orderArr = [$orderBy => \TYPO3\Flow\Persistence\QueryInterface::ORDER_DESCENDING];
             }
         }
         if (isset($orderArr) && !empty($orderArr)) {
             $orderings = $orderArr;
         } else {
             $orderings = ['bistum' => \TYPO3\Flow\Persistence\QueryInterface::ORDER_ASCENDING];
         }
         $bistums = $this->bistumRepository->getCertainNumberOfBistum($start, $length, $orderings);
         $recordsTotal = $this->bistumRepository->getNumberOfEntries();
     } else {
         if (isset($orderBy) && !empty($orderBy) && (isset($orderDir) && !empty($orderDir))) {
             if ($orderDir === 'asc') {
                 $orderArr = [$orderBy, 'ASC'];
             } elseif ($orderDir === 'desc') {
                 $orderArr = [$orderBy, 'DESC'];
             }
         }
         if (isset($orderArr) && !empty($orderArr)) {
             $orderings = $orderArr;
         } else {
             $orderings = ['bistum', 'ASC'];
         }
         $bistums = $this->bistumRepository->searchCertainNumberOfBistum($start, $length, $orderings, $searchArr, 1);
         $recordsFiltered = $this->bistumRepository->searchCertainNumberOfBistum($start, $length, $orderings, $searchArr, 2);
         $recordsTotal = $this->bistumRepository->getNumberOfEntries();
     }
     if (!isset($recordsFiltered)) {
         $recordsFiltered = $recordsTotal;
     }
     $bistumArr = [];
     foreach ($bistums as $k => $bistum) {
         if (is_object($bistum)) {
             $uUID = $bistum->getUUID();
             if (!empty($uUID)) {
                 $bistumArr[$k]['uUID'] = $uUID;
             } else {
                 $bistumArr[$k]['uUID'] = '';
             }
             $bistumName = $bistum->getBistum();
             if (!empty($bistumName)) {
                 $bistumArr[$k]['bistum'] = $bistumName;
             } else {
                 $bistumArr[$k]['bistum'] = '';
             }
             $kirchenprovinz = $bistum->getKirchenprovinz();
             if (!empty($kirchenprovinz)) {
                 $bistumArr[$k]['kirchenprovinz'] = $kirchenprovinz;
             } else {
                 $bistumArr[$k]['kirchenprovinz'] = '';
             }
             $ist_erzbistum = $bistum->getIst_erzbistum();
             if (!empty($ist_erzbistum)) {
                 $bistumArr[$k]['ist_erzbistum'] = $ist_erzbistum;
             } else {
                 $bistumArr[$k]['ist_erzbistum'] = '';
             }
             $shapefile = $bistum->getShapefile();
             if (!empty($shapefile)) {
                 $bistumArr[$k]['shapefile'] = $shapefile;
             } else {
                 $bistumArr[$k]['shapefile'] = '';
             }
             $bemerkung = $bistum->getBemerkung();
             if (!empty($bemerkung)) {
                 $bistumArr[$k]['bemerkung'] = $bemerkung;
             } else {
                 $bistumArr[$k]['bemerkung'] = '';
             }
             $ortObj = $bistum->getOrt();
             if (is_object($ortObj)) {
                 $ort = $ortObj->getUUID() . ':' . $ortObj->getOrt();
                 if (!empty($ort)) {
                     $bistumArr[$k]['ort'] = $ort;
                 } else {
                     $bistumArr[$k]['ort'] = '';
                 }
             } else {
                 $bistumArr[$k]['ort'] = '';
             }
         }
     }
     $this->view->assign('bistum', ['data' => $bistumArr, 'draw' => $draw, 'recordsTotal' => $recordsTotal, 'recordsFiltered' => $recordsFiltered]);
     $this->view->assign('bearbeiter', $this->bearbeiterObj->getBearbeiter());
     return $this->view->render();
 }