Advertisement
BenjaminS

Fix on the other one..

Sep 26th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * @param \Webguerillas\Wgbe\Domain\Repository\ServiceRepository
  3. * @inject
  4. */
  5. protected $serviceRepository;
  6.  
  7. /**
  8. * action create
  9. *
  10. * @param \Webguerillas\Wgbe\Domain\Model\Cases $newCases
  11. * @param integer $serviceUid
  12. * @return void
  13. */
  14. public function createAction(\Webguerillas\Wgbe\Domain\Model\Cases $newCases, $serviceUid) {
  15. $service = $this->serviceRepository->findByUid($serviceUid);
  16. if ($service instanceof Webguerillas\Wgbe\Domain\Model\Service) {
  17. $newCases->setService($service);
  18. }
  19. $this->casesRepository->add($newCases);
  20. $this->flashMessageContainer->add('Your new Cases was created.');
  21.  
  22. $this->redirect('list',NULL,NULL,array('service' => $serviceUid));
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement