public function handleRemove() { if (($entity = $this->notificationUserRepository->find($this->id)) === null) { throw new BadRequestException(); } $this->notificationUserRepository->delete($entity); $this->redirect('this'); $this->redrawControl('content'); $this->id = null; }
public function handleRemove() { if (($entity = $this->jobRepository->find($this->id)) === null) { throw new BadRequestException(); } if ($entity->user !== $this->user->identity) { throw new BadRequestException(); } $this->jobRepository->delete($entity); if (!$this->presenter->isAjax()) { $this->redirect('this'); } }
public function registrationSuccess() { $this->invitationRepository->delete($this->invitation); $this->flashMessage($this->translator->translate('Your registration is complete.'), 'success'); $this->redirect('this', array('hash' => null, 'registration' => null)); }