예제 #1
0
 /**
  * Lists all Post models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new PostSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $modelComment = new PostComment();
     $countPending = $modelComment->getCount($modelComment::COMMENT_MODER_PENDING, $modelComment::TYPE_OF_COMMENT);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'countPending' => $countPending]);
 }
예제 #2
0
파일: Admin.php 프로젝트: Dominus77/blog
 /**
  * Колличество комментариев блога требующих проверки
  * @return int
  */
 public static function getCountCommentPending()
 {
     $modelComment = new PostComment();
     return $modelComment->getCount($modelComment::COMMENT_MODER_PENDING, $modelComment::TYPE_OF_COMMENT);
 }