src/apis/StorageController.php
public function actionImage($id)
    {
        $model = StorageImage::find()->where(['id' => $id])->with(['file'])->one();

        if (!$model) {
            throw new NotFoundHttpException("Unable to find the given storage image.");
        }

        return $model;
    }
public function actionImage($id)
    {
        $model = StorageImage::find()->where(['id' => $id])->with(['file'])->one();

        if (!$model) {
            throw new NotFoundHttpException("Unable to find the given storage image.");
        }

        return $model;
    }
public function actionImage ( $ id ) { $ model = StorageImage :: find ( ) -> where ( [ 'id' => $ id ] ) -> with ( [ 'file' ] ) -> one ( ) ; if ( ! $ model ) { throw new NotFoundHttpException ( "Unable to find the given storage image." ) ; } return $ model ; }
Get image model.

This is mainly used for external api access.

@param integer $id
@return StorageImage
@since 1.2.3
Get image model .