/** * * @access public * @param \CCDNForum\ForumBundle\Entity\Board $board * @return \CCDNForum\ForumBundle\Manager\ManagerInterface */ public function saveBoard(Board $board) { $boardCount = $this->model->getBoardCount(); $board->setListOrderPriority(++$boardCount); $this->gateway->saveBoard($board); return $this; }
protected function createBoard($category, $order, $name, $description, $cachedTopicCount, $cachedPostCount, array $boardReadRoles = array(), array $topicCreateRoles = array(), array $topicReplyRoles = array()) { $board = new Board(); $board->setCategory($category); $board->setName($name); $board->setDescription($description); $board->setCachedTopicCount($cachedTopicCount); $board->setCachedPostCount($cachedPostCount); $board->setListOrderPriority($order); $board->setReadAuthorisedRoles($boardReadRoles); $board->setTopicCreateAuthorisedRoles($topicCreateRoles); $board->setTopicReplyAuthorisedRoles($topicReplyRoles); return $board; }