private function forumTypeHandle(ForumThread $t) { try { $forum = null; $id = $this->getMixId($t->getForum()); if ($id !== null) { $forum = $this->forumDao->find($id); } $t->setForum($forum); } catch (\Exception $ex) { $this->logError($ex->getMessage()); throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious()); } }
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]); }
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"); }