where(['entity' => $entity, 'entity_id' => $entity_id, 'status' => StatusEnum::STATUS_ON, 'parent_id' => 0]); return new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => Comment::PAGE_SIZE, ], 'sort' => [ 'defaultOrder' => [ 'created_at' => SORT_ASC, ] ] ]); } }