本文整理汇总了PHP中comments::GetComments方法的典型用法代码示例。如果您正苦于以下问题:PHP comments::GetComments方法的具体用法?PHP comments::GetComments怎么用?PHP comments::GetComments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comments
的用法示例。
在下文中一共展示了comments::GetComments方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
if (isset(yii::$app->request->isAjax)) {
$page_id = yii::$app->request->get('page_id');
$comments = new comments();
$commentsItems = $comments->GetComments($page_id);
$data['items'] = $commentsItems['items'];
$data['pagination'] = $commentsItems['pagination'];
return $this->renderAjax('index', $data);
}
}
示例2: actionDetail
public function actionDetail()
{
$model = $this->GetModel();
$properties = new Properties();
$options = new Options();
$comments = new comments();
$this->blog = $model::findOne($this->item->parent_id);
$this->name = $options->GetOptions('name');
$data['options'] = $options;
$data['properties'] = $properties;
$data['comments'] = $comments;
$data['value'] = $this->item;
$commentsItems = $comments->GetComments($this->item->id);
$data['commentsItems'] = $commentsItems['items'];
$data['commentsPager'] = $commentsItems['pagination'];
return $this->render('detail', $data);
}