| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function run($id, string $ext) |
||
| 44 | { |
||
| 45 | $this->checkAccess( |
||
| 46 | ($model = $this->findModel($id)), |
||
| 47 | Yii::$app->request->getQueryParams() |
||
| 48 | ); |
||
| 49 | |||
| 50 | return Yii::$app->response->sendFile( |
||
| 51 | $model->filePath($ext), |
||
|
|
|||
| 52 | $model->fileName($ext), |
||
| 53 | [ |
||
| 54 | 'mimeType' => $model->fileMimeType($ext), |
||
| 55 | 'inline' => !Yii::$app->request |
||
| 56 | ->getQueryParam($this->downloadParam, false), |
||
| 57 | ] |
||
| 61 |