/** * Update a list of Band entities */ public function updateListAction() { if ($this->request->hasArgument('data')) { $bandlist = $this->request->getArgument('data'); } if (empty($bandlist)) { $this->throwStatus(400, 'Required data arguemnts not provided', null); } foreach ($bandlist as $uuid => $band) { if (isset($uuid) && !empty($uuid)) { $bandObj = $this->bandRepository->findByIdentifier($uuid); $bandObj->setNummer($band['nummer']); $bandObj->setTitel($band['titel']); $bandObj->setKurztitel($band['kurztitel']); $bandObj->setSortierung($band['sortierung']); $bistumUUID = $band['bistum']; $bistum = $this->bistumRepository->findByIdentifier($bistumUUID); $bandObj->setBistum($bistum); $this->bandRepository->update($bandObj); } else { $this->throwStatus(400, 'Required uUID not provided', null); } } $this->persistenceManager->persistAll(); $this->throwStatus(200, null, null); }