Skip to content

1.9 Release

Choose a tag to compare

@ihorchepurnyi ihorchepurnyi released this 05 Dec 17:14
· 71 commits to master since this release
  1. Added AdjacencyListBehavior for save comment and delete child comments
  2. Added ModerationBehavior
  3. Renamed the following methods in CommentModel
  • getIsActive() -> isActive()
  • getIsDeleted() -> isDeleted()
  • getListAuthorsNames() -> getAuthors()
  1. Removed $showDeletedComments property from widget and model
  2. Remove method deleteComment() from CommentModel
  3. Added ArrayDataProvider CommentWidget , now you can enable pagination and sorting, for example:
<?php echo \yii2mod\comments\widgets\Comment::widget([
      'model' => $model,
      'dataProviderConfig' => [ 
          'sort' => [
              'attributes' => ['id'],
              'defaultOrder' => ['id' => SORT_DESC],
          ],
          'pagination' => [
              'pageSize' => 10
          ],
      ],
]); ?>
  1. Also added ListView for display a comments list.