backend/controllers/MediaBrowserController.php
/**
     * Displays files browser for editor and field.
     *
     * @param int|null $post
     * @return string
     * @throws NotFoundHttpException
     */
Displays files browser for editor and field.
@param int|null $post
@return string
@throws NotFoundHttpException
Displays files browser for editor and field . @param int|null $post @return string @throws NotFoundHttpException
public function actionIndex($post = null)
    {
        $this->layout = "blank";
        $model = new Media(['scenario' => 'upload']);
        if (isset($post) && !$post = $this->findPost($post)->id) {
            throw new NotFoundHttpException(Yii::t('writesdown', 'The requested page does not exist.'));
        }
        return $this->render('index', [
            'post' => $post,
            'model' => $model,
        ]);
    }
public function actionIndex ( $ post = null ) { $ this -> layout = " blank " ; $ model = new Media ( [ 'scenario' => 'upload' ] ) ; if ( isset ( $ post ) && ! $ post = $ this -> findPost ( $ post ) -> id ) { throw new NotFoundHttpException ( Yii :: t ( 'writesdown' , 'The requested page does not exist.' ) ) ; } return $ this -> render ( 'index' , [ 'post' => $ post , 'model' => $ model , ] ) ; }
Displays files browser for editor and field.
Displays files browser for editor and field .