From 77df534456ef7fb46a9249e526efab6fc333084b Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 25 Nov 2016 16:31:42 +0200 Subject: [PATCH] slider --- widgets/Seo.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/widgets/Seo.php b/widgets/Seo.php index 2d1b73f..7d67be0 100755 --- a/widgets/Seo.php +++ b/widgets/Seo.php @@ -39,7 +39,7 @@ class Seo extends Widget $this->url = \Yii::$app->request->url; $this->project_name = \Yii::$app->name; if(empty(self::$optionsList)){ - self::$optionsList = ArrayHelper::getColumn(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(),'alias'); + self::$optionsList = ArrayHelper::getColumn(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(),'lang.alias'); } parent::init(); @@ -107,7 +107,6 @@ class Seo extends Widget } else if(!empty($filter) && !$this->checkFilter($filter)){ - $array = $this->arrayBuilder($filter); return $this->getNameString($array); } @@ -394,7 +393,7 @@ class Seo extends Widget if (isset($filter['brands']) && count($filter['brands']) == 1) { - $model = Brand::find()->joinWith('lang')->where(['alias' => $filter['brands'][0]])->one(); + $model = Brand::find()->joinWith('lang')->where(['lang.alias' => $filter['brands'][0]])->one(); if (!$model instanceof Brand) { \Yii::$app->response->redirect(['/site/error'], 404); @@ -406,7 +405,7 @@ class Seo extends Widget } - $optionsList = ArrayHelper::map(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(), 'alias', 'name'); + $optionsList = ArrayHelper::map(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(), 'lang.alias', 'name'); foreach ($optionsList as $optionList => $name) { -- libgit2 0.21.4