Commit 5a0c03c7ba0fd2f2ac195d4530ec6593c271af07
1 parent
e60b727a
big commti
Showing
2 changed files
with
10 additions
and
11 deletions
Show diff stats
common/modules/product/models/Brand.php
@@ -42,17 +42,16 @@ class Brand extends \yii\db\ActiveRecord | @@ -42,17 +42,16 @@ class Brand extends \yii\db\ActiveRecord | ||
42 | 42 | ||
43 | public function behaviors() | 43 | public function behaviors() |
44 | { | 44 | { |
45 | - return | ||
46 | - [ | ||
47 | - 'class' => Slug::className(), | ||
48 | - 'in_attribute' => 'name', | ||
49 | - 'out_attribute' => 'alias', | ||
50 | - 'translit' => true | ||
51 | - | 45 | + return [ |
46 | + 'slug' => [ | ||
47 | + 'class' => 'common\behaviors\Slug', | ||
48 | + 'in_attribute' => 'name', | ||
49 | + 'out_attribute' => 'alias', | ||
50 | + 'translit' => true | ||
51 | + ], | ||
52 | ]; | 52 | ]; |
53 | } | 53 | } |
54 | 54 | ||
55 | - | ||
56 | /** | 55 | /** |
57 | * @inheritdoc | 56 | * @inheritdoc |
58 | */ | 57 | */ |
common/modules/product/models/Category.php
@@ -48,12 +48,12 @@ class Category extends \yii\db\ActiveRecord | @@ -48,12 +48,12 @@ class Category extends \yii\db\ActiveRecord | ||
48 | 'keyNameGroup' => null, | 48 | 'keyNameGroup' => null, |
49 | 'keyNamePath' => 'path', | 49 | 'keyNamePath' => 'path', |
50 | ], | 50 | ], |
51 | - [ | ||
52 | - 'class' => Slug::className(), | 51 | + 'slug' => [ |
52 | + 'class' => 'common\behaviors\Slug', | ||
53 | 'in_attribute' => 'name', | 53 | 'in_attribute' => 'name', |
54 | 'out_attribute' => 'alias', | 54 | 'out_attribute' => 'alias', |
55 | 'translit' => true | 55 | 'translit' => true |
56 | - ] | 56 | + ], |
57 | 57 | ||
58 | ]; | 58 | ]; |
59 | } | 59 | } |