public function getCommentList() { $params = $this->getParamsObject(); $page = isset($_POST['page']) && (int) $_POST['page'] > 0 ? (int) $_POST['page'] : 1; $commentsList = new BASE_CMP_CommentsList($params, $_POST['cid'], $page); exit(json_encode(array('onloadScript' => OW::getDocument()->getOnloadScript(), 'commentList' => $commentsList->render(), 'commentCount' => $this->commentService->findCommentCount($params->getEntityType(), $params->getEntityId())))); }
/** * Constructor. * * @param string $entityType * @param integer $entityId * @param integer $page * @param string $displayType */ public function __construct(BASE_CommentsParams $params, $id) { parent::__construct($params, $id); $this->setTemplate(OW::getPluginManager()->getPlugin('base')->getMobileCmpViewDir() . 'comments_list.html'); }