Commit 6f8e46af290b7a8ea2214ebe405c2bcaa9d92114
1 parent
d8781ac5
+ fix по сливаниям веток
Showing
6 changed files
with
15 additions
and
6 deletions
Show diff stats
backend/controllers/MenuController.php
backend/controllers/MenuLocationController.php
... | ... | @@ -4,7 +4,7 @@ namespace backend\controllers; |
4 | 4 | |
5 | 5 | use Yii; |
6 | 6 | use backend\models\MenuLocation; |
7 | -use backend\models\MenuSearchLocation; | |
7 | +use backend\models\MenuLocationSearch; | |
8 | 8 | use yii\web\Controller; |
9 | 9 | use yii\web\NotFoundHttpException; |
10 | 10 | use yii\filters\VerbFilter; |
... | ... | @@ -32,7 +32,7 @@ class MenuLocationController extends Controller |
32 | 32 | */ |
33 | 33 | public function actionIndex() |
34 | 34 | { |
35 | - $searchModel = new MenuSearchLocation(); | |
35 | + $searchModel = new MenuLocationSearch(); | |
36 | 36 | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); |
37 | 37 | |
38 | 38 | return $this->render('index', [ | ... | ... |
backend/controllers/TerminController.php
... | ... | @@ -10,6 +10,7 @@ use yii\web\NotFoundHttpException; |
10 | 10 | use yii\filters\VerbFilter; |
11 | 11 | use backend\models\TerminLang; |
12 | 12 | use backend\models\TerminStructure; |
13 | +use yii\filters\AccessControl; | |
13 | 14 | |
14 | 15 | /** |
15 | 16 | * TerminController implements the CRUD actions for Termin model. | ... | ... |
backend/models/Menu.php
backend/models/MenuSearch.php
... | ... | @@ -49,7 +49,8 @@ class MenuSearch extends Menu |
49 | 49 | |
50 | 50 | $this->load($params); |
51 | 51 | |
52 | - if (!$this->validate()) { | |
52 | + if (! $this->validate()) | |
53 | + { | |
53 | 54 | // uncomment the following line if you do not want to return any records when validation fails |
54 | 55 | // $query->where('0=1'); |
55 | 56 | return $dataProvider; |
... | ... | @@ -67,7 +68,7 @@ class MenuSearch extends Menu |
67 | 68 | ]); |
68 | 69 | |
69 | 70 | $query->andFilterWhere(['like', 'name', $this->name]) |
70 | - ->andFilterWhere(['like', 'url', $this->url]); | |
71 | + ->andFilterWhere(['like', 'url', $this->url]); | |
71 | 72 | |
72 | 73 | return $dataProvider; |
73 | 74 | } | ... | ... |
backend/views/menu/index.php
... | ... | @@ -28,8 +28,9 @@ $this->params['breadcrumbs'][] = $this->title; |
28 | 28 | |
29 | 29 | [ |
30 | 30 | 'attribute' => Yii::t('app', 'termin'), |
31 | - 'value' => function ($model) { | |
32 | - return empty($model->termin_id) ? '-' : $model->termin_lang->termin_title; | |
31 | + 'value' => function ($model) | |
32 | + { | |
33 | + return empty ($model->termin_id) ? '-' : $model->terminLang->termin_title; | |
33 | 34 | }, |
34 | 35 | ], |
35 | 36 | 'menu_pid', | ... | ... |