Blame view

views/artbox_comment_list.php 888 Bytes
a2cde075   Yarik   first commit
1
  <?php
faff2c48   Yarik   Artbox comment cr...
2
      use artbox\webcomment\models\CommentModel;
a2cde075   Yarik   first commit
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      use yii\base\Model;
      use yii\data\ActiveDataProvider;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ListView;
      use yii\widgets\Pjax;
      
      /**
       * @var CommentModel       $comment_model
       * @var array              $list_params
       * @var array              $item_options
       * @var string             $item_view
       * @var Model              $model
       * @var ActiveDataProvider $comments
       * @var View               $this
       */
      Pjax::begin();
      if(( $success = \Yii::$app->session->getFlash('artbox_comment_success') ) != NULL) {
          echo Html::tag('p', $success);
      }
      echo ListView::widget([
          'dataProvider' => $comments,
          'itemOptions'  => $item_options,
          'itemView'     => $item_view,
          'summary'      => '',
      ]);
      Pjax::end();