public function search($forumId, $threadId)
    {
        $dataProvider = new ActiveDataProvider([
            'query' => static::find()->where(['forum_id' => $forumId, 'thread_id' => $threadId]),
            'pagination' => [
                'defaultPageSize' => 10,
                'pageSizeLimit' => false,
                'forcePageParam' => false
            ],
        ]);
        $dataProvider->sort->defaultOrder = ['id' => SORT_ASC];
        return $dataProvider;
    }
public function search($forumId, $threadId)
    {
        $dataProvider = new ActiveDataProvider([
            'query' => static::find()->where(['forum_id' => $forumId, 'thread_id' => $threadId]),
            'pagination' => [
                'defaultPageSize' => 10,
                'pageSizeLimit' => false,
                'forcePageParam' => false
            ],
        ]);
        $dataProvider->sort->defaultOrder = ['id' => SORT_ASC];
        return $dataProvider;
    }
public function search ( $ forumId , $ threadId ) { $ dataProvider = new ActiveDataProvider ( [ 'query' => static :: find ( ) -> where ( [ 'forum_id' => $ forumId , 'thread_id' => $ threadId ] ) , 'pagination' => [ 'defaultPageSize' => 10 , 'pageSizeLimit' => false , 'forcePageParam' => false ] , ] ) ; $ dataProvider -> sort -> defaultOrder = [ 'id' => SORT_ASC ] ; return $ dataProvider ; }
Searches for posts.
@param int $forumId
@param int $threadId
@return ActiveDataProvider
Searches for posts .