Ejemplo n.º 1
0
 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()))));
 }
Ejemplo n.º 2
0
 /**
  * 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');
 }