@@ -30,8 +30,9 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function init() |
32 | 32 | { |
33 | - if (empty($this->files)) |
|
34 | - return null; |
|
33 | + if (empty($this->files)) { |
|
34 | + return null; |
|
35 | + } |
|
35 | 36 | Yii::$app->getModule('files')->registerTranslations(); |
36 | 37 | if (empty($this->lightboxKey)) { |
37 | 38 | $this->lightboxKey = $this->files[0]->field . '-' . $this->files[0]->object_id; |
@@ -50,8 +51,9 @@ discard block |
||
50 | 51 | |
51 | 52 | $this->getView()->registerJs("yiiDownloadAllLink = '" . Url::toRoute('files/default/zip') . "'", View::POS_BEGIN, 'yiiDownloadAllLink'); |
52 | 53 | |
53 | - if ($this->passFirst && sizeof($this->files) > 0) |
|
54 | - $this->files = array_slice($this->files, 1); |
|
54 | + if ($this->passFirst && sizeof($this->files) > 0) { |
|
55 | + $this->files = array_slice($this->files, 1); |
|
56 | + } |
|
55 | 57 | |
56 | 58 | |
57 | 59 | return $this->render('fileListWidget', [ |
@@ -37,8 +37,9 @@ |
||
37 | 37 | $this->registerTranslations(); |
38 | 38 | $this->block_id = rand(9999999, 999999999); |
39 | 39 | |
40 | - if (!$this->uploadButtonText) |
|
41 | - $this->uploadButtonText = Yii::t('files', 'Upload'); |
|
40 | + if (!$this->uploadButtonText) { |
|
41 | + $this->uploadButtonText = Yii::t('files', 'Upload'); |
|
42 | + } |
|
42 | 43 | |
43 | 44 | $this->ratio = $this->model->getBehavior('files')->attributes[$this->attribute]['ratio'] ?? null; |
44 | 45 |