1.9 Release
- Added
AdjacencyListBehaviorfor save comment and delete child comments - Added
ModerationBehavior - Renamed the following methods in CommentModel
- getIsActive() -> isActive()
- getIsDeleted() -> isDeleted()
- getListAuthorsNames() -> getAuthors()
- Removed
$showDeletedCommentsproperty from widget and model - Remove method
deleteComment()from CommentModel - 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
],
],
]); ?>- Also added ListView for display a comments list.