Commit b14c8812d69f81088185131964fb378d67c43070
1 parent
ee2ceed3
Video + fixes
Showing
1 changed file
with
15 additions
and
1 deletions
Show diff stats
models/ProductVideo.php
... | ... | @@ -12,6 +12,8 @@ |
12 | 12 | * @property string $url |
13 | 13 | * @property Product $product |
14 | 14 | * @property string $title |
15 | + * @property boolean $is_main | |
16 | + * @property boolean $is_display | |
15 | 17 | */ |
16 | 18 | class ProductVideo extends ActiveRecord |
17 | 19 | { |
... | ... | @@ -50,11 +52,21 @@ |
50 | 52 | ], |
51 | 53 | [ |
52 | 54 | [ |
55 | + 'is_main', | |
56 | + 'is_display', | |
57 | + ], | |
58 | + 'boolean', | |
59 | + ], | |
60 | + [ | |
61 | + [ | |
53 | 62 | 'url', |
54 | 63 | ], |
55 | 64 | 'match', |
56 | 65 | 'pattern' => '/^.*<iframe.*https:\/\/.*$/', |
57 | - 'message' => \Yii::t('app', 'Ссылка обязательно должна включать тег iframe и протокол должен быть https://'), | |
66 | + 'message' => \Yii::t( | |
67 | + 'app', | |
68 | + 'Ссылка обязательно должна включать тег iframe и протокол должен быть https://' | |
69 | + ), | |
58 | 70 | ], |
59 | 71 | [ |
60 | 72 | [ 'product_id' ], |
... | ... | @@ -76,6 +88,8 @@ |
76 | 88 | 'product_id' => \Yii::t('app', 'Product ID'), |
77 | 89 | 'url' => \Yii::t('app', 'Url'), |
78 | 90 | 'title' => \Yii::t('app', 'Title'), |
91 | + 'is_main' => \Yii::t('app', 'Is main'), | |
92 | + 'is_display' => \Yii::t('app', 'Is display'), | |
79 | 93 | ]; |
80 | 94 | } |
81 | 95 | ... | ... |