@@ -165,7 +165,7 @@ |
||
165 | 165 | * Method downloads the requested file from the API and saves it to the local machine. |
166 | 166 | * Method respects authentication and access rules. |
167 | 167 | * |
168 | - * @param integer|File $file the ID of the file, or the [[File]] model. |
|
168 | + * @param File $file the ID of the file, or the [[File]] model. |
|
169 | 169 | * When model is passed, no additional query will be performed. |
170 | 170 | * @param bool $overrideCache whether the cache must be invalidated |
171 | 171 | * @return string full path to the file. File is located under the [[directory]] |
@@ -14,10 +14,8 @@ |
||
14 | 14 | use hipanel\components\FileStorage; |
15 | 15 | use hipanel\helpers\ArrayHelper; |
16 | 16 | use hipanel\models\File; |
17 | -use hipanel\widgets\filePreview\FilePreviewFactory; |
|
18 | 17 | use hipanel\widgets\filePreview\FilePreviewFactoryInterface; |
19 | 18 | use hipanel\widgets\filePreview\Dimensions; |
20 | -use hipanel\widgets\filePreview\OutboundDimensions; |
|
21 | 19 | use hipanel\widgets\filePreview\types\PdfPreviewGenerator; |
22 | 20 | use hipanel\widgets\filePreview\UnsupportedMimeTypeException; |
23 | 21 | use hipanel\widgets\filePreview\InsetDimensions; |
@@ -143,6 +143,9 @@ |
||
143 | 143 | return ['/file/view', 'id' => $this->file->id]; |
144 | 144 | } |
145 | 145 | |
146 | + /** |
|
147 | + * @param string $ext |
|
148 | + */ |
|
146 | 149 | private function getExtIcon($ext) |
147 | 150 | { |
148 | 151 | $defaultIcon = 'fa-file-text-o'; |
@@ -45,6 +45,7 @@ |
||
45 | 45 | |
46 | 46 | /** |
47 | 47 | * @inheritdoc |
48 | + * @param string $mimeType |
|
48 | 49 | */ |
49 | 50 | public function resolveGeneratorClass($mimeType) |
50 | 51 | { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | |
6 | 6 | use hipanel\widgets\filePreview\DimensionsInterface; |
7 | 7 | use Imagine\Gd\Imagine; |
8 | -use Imagine\Image\ManipulatorInterface; |
|
9 | 8 | use yii\imagine\Image; |
10 | 9 | |
11 | 10 | class ImagePreviewGenerator extends AbstractPreviewGenerator |