Esempio n. 1
0
 private function createForumThread(ArrayHash $values)
 {
     $thread = new ForumThread((array) $values);
     try {
         $thread->setAuthor($this->getUser()->getIdentity());
         $thread->setCommentMode(CommentMode::ALLOWED);
         $this->forumService->createForumThread($thread);
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataSave(null, "this", $ex);
     }
     $abbr = $this->getParameter("abbr");
     $this->redirect("showThread", [$thread->getAlias(), $abbr]);
 }
Esempio n. 2
0
 public function createForumThread(ArrayHash $values)
 {
     try {
         $f = new ForumThread((array) $values);
         $f->setAuthor($this->getUser()->getIdentity());
         $this->forumService->createForumThread($f);
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataSave(null, "this", $ex);
     }
     $this->redirect("default");
 }