/** * createCommentInstance * * @param string $pageId page instance id * @param string $commentInput comment parameter * * @return void */ public function createCommentInstance($pageId, $commentInput) { if ($commentInput === 'true') { if ($this->comment->getInstanceId($pageId) === null) { $this->comment->createInstance($pageId); $this->comment->configure($this->comment->getInstanceId($pageId), ['useWysiwyg' => true]); } } }
/** * 게시판 제거 * * @param string $boardId board id * @return void */ public function destroy($boardId) { $config = $this->configHandler->get($boardId); if ($config === null) { throw new Exceptions\InvalidConfigException(); } $this->conn->beginTransaction(); // get document config $this->document->destroyInstance($boardId); $this->commentHandler->drop($this->commentHandler->getInstanceId($boardId)); // remove board config $this->configHandler->remove($config); // 연결된 df 제거 foreach ($this->configHandler->getDynamicFields($config) as $config) { $this->dynamicField->drop($config); } $this->conn->commit(); }