Exemplo n.º 1
0
 /**
  * Handler for delete article comment
  * @param ArticleComment $comm
  */
 public function deleteComment($comm)
 {
     try {
         $this->staticPageService->deleteComment($comm, $this->getEntity());
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataDelete($comm->getId(), "this", $ex);
     }
     if ($this->isAjax()) {
         $this->redrawControl("commentsData");
     } else {
         $this->redirect("this");
     }
 }
Exemplo n.º 2
0
 private function prepareStaticPageForm($name, $selfId = null)
 {
     $form = new StaticPageForm($this, $name, $this->getTranslator());
     try {
         $sportGroups = $this->sportGroupService->getSelectAllSportGroups($selfId);
         $form->setSportGroups($sportGroups);
         $users = $this->userService->getSelectUsers();
         $form->setUsers($users);
         $pages = $this->staticPageService->getSelectStaticPages($selfId);
         $form->setPages($pages);
     } catch (Exceptions\DataErrorException $ex) {
         $this->flashMessage($ex->getMessage(), self::FM_ERROR);
     }
     return $form;
 }