/**
  * @param \DLigo\Animaltool\Domain\Model\Location $location
  * @return void
  */
 public function deleteAction(Location $location)
 {
     $this->locationRepository->remove($location);
     $this->addFlashMessage('Deleted a location.', '', \TYPO3\Flow\Error\Message::SEVERITY_OK, array(), 'flash.location.delete');
     $this->redirect('index');
 }
Esempio n. 2
0
 /**
  */
 public function getAviableLocations()
 {
     $locs = $this->getLocations();
     if (empty($locs) || $locs->count() == 0) {
         $locs = $this->locationRepository->findAll();
     }
     return $locs;
 }
Esempio n. 3
0
 /**
  * @param \DLigo\Animaltool\Domain\Model\User $user
  * @return void
  */
 public function editAction(User $user)
 {
     $this->view->assign('roles', $this->getRoles());
     $this->view->assign('user', $user);
     $this->view->assign('allLocations', $this->locationRepository->findAll());
 }