vendor/2amigos/yii2-file-upload-widget/src/actions/FileListAction.php
/**
     * Builds the data provider that needs to be rendered. If you wish to modify it, you will have to do it on the
     * view itself -ie change pager settings etc.
     *
     * @inheritdoc
     * @throws NotFoundHttpException
     */
Builds the data provider that needs to be rendered. If you wish to modify it, you will have to do it on the
view itself -ie change pager settings etc.


Builds the data provider that needs to be rendered . If you wish to modify it you will have to do it on the view itself - ie change pager settings etc .
public function run()
    {
        $ownerId = Yii::$app->request->get('ownerId');
        if (!$ownerId) {
            throw new NotFoundHttpException();
        }
        $searchClass = new $this->searchClass();
        $searchClass->innerJoinWith = [
            $this->ownerRelation => function ($q) use ($ownerId) {
                $q->andWhere([$this->ownerTable . ".id" => $ownerId]);
            }
        ];
        $method = Yii::$app->request->isPjax ? 'renderAjax' : 'render';
        $this->controller->{$method}($this->view, ['ownerId' => $ownerId, 'dataProvider' => $searchClass->search([])]);
        throw new NotFoundHttpException(Yii::t('fileupload', 'Page not found'));
    }
public function run ( ) { $ ownerId = Yii :: $ app -> request -> get ( 'ownerId' ) ; if ( ! $ ownerId ) { throw new NotFoundHttpException ( ) ; } $ searchClass = new $ this -> searchClass ( ) ; $ searchClass -> innerJoinWith = [ $ this -> ownerRelation => function ( $ q ) use ( $ ownerId ) { $ q -> andWhere ( [ $ this -> ownerTable . " .id " => $ ownerId ] ) ; } ] ; $ method = Yii :: $ app -> request -> isPjax ? 'renderAjax' : 'render' ; $ this -> controller -> { $ method } ( $ this -> view , [ 'ownerId' => $ ownerId , 'dataProvider' => $ searchClass -> search ( [ ] ) ] ) ; throw new NotFoundHttpException ( Yii :: t ( 'fileupload' , 'Page not found' ) ) ; }
Builds the data provider that needs to be rendered.
Builds the data provider that needs to be rendered .