diff --git a/common/modules/product/models/Brand.php b/common/modules/product/models/Brand.php index 43d6d9d..f519631 100755 --- a/common/modules/product/models/Brand.php +++ b/common/modules/product/models/Brand.php @@ -42,17 +42,16 @@ class Brand extends \yii\db\ActiveRecord public function behaviors() { - return - [ - 'class' => Slug::className(), - 'in_attribute' => 'name', - 'out_attribute' => 'alias', - 'translit' => true - + return [ + 'slug' => [ + 'class' => 'common\behaviors\Slug', + 'in_attribute' => 'name', + 'out_attribute' => 'alias', + 'translit' => true + ], ]; } - /** * @inheritdoc */ diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index d8bc742..6ebf024 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -48,12 +48,12 @@ class Category extends \yii\db\ActiveRecord 'keyNameGroup' => null, 'keyNamePath' => 'path', ], - [ - 'class' => Slug::className(), + 'slug' => [ + 'class' => 'common\behaviors\Slug', 'in_attribute' => 'name', 'out_attribute' => 'alias', 'translit' => true - ] + ], ]; } -- libgit2 0.21.4