Commit 3a45f80dc973c63ad0ba283e1feff2141c71c3f2
1 parent
24a63083
-Added languages, small fixes
Showing
9 changed files
with
62 additions
and
7 deletions
Show diff stats
1 | +<?php | ||
2 | + | ||
3 | + namespace backend\actions; | ||
4 | + | ||
5 | + use artbox\core\admin\actions\Index as CoreInde; | ||
6 | + use backend\models\Search; | ||
7 | + | ||
8 | + class Index extends CoreInde | ||
9 | + { | ||
10 | + public function init() | ||
11 | + { | ||
12 | + $this->_query = call_user_func( | ||
13 | + [ | ||
14 | + $this->model, | ||
15 | + 'find', | ||
16 | + ] | ||
17 | + ); | ||
18 | + | ||
19 | + $this->_search = new Search( | ||
20 | + [ | ||
21 | + 'model' => $this->model, | ||
22 | + 'hasLanguage' => $this->hasLanguage, | ||
23 | + 'controllerId' => $this->controller->id, | ||
24 | + ] | ||
25 | + ); | ||
26 | + | ||
27 | + if ($this->hasLanguage) { | ||
28 | + $this->_query->joinWith('language'); | ||
29 | + } | ||
30 | + | ||
31 | + $this->parseColumns(); | ||
32 | + | ||
33 | + \artbox\core\admin\assets\Index::register($this->controller->view); | ||
34 | + } | ||
35 | + } | ||
0 | \ No newline at end of file | 36 | \ No newline at end of file |
backend/controllers/BlogArticleController.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | use artbox\core\admin\actions\Create; | 11 | use artbox\core\admin\actions\Create; |
12 | use artbox\core\admin\actions\Delete; | 12 | use artbox\core\admin\actions\Delete; |
13 | - use artbox\core\admin\actions\Index; | 13 | + use backend\actions\Index; |
14 | use artbox\core\admin\actions\Update; | 14 | use artbox\core\admin\actions\Update; |
15 | use artbox\core\admin\actions\View; | 15 | use artbox\core\admin\actions\View; |
16 | use artbox\core\admin\interfaces\ControllerInterface; | 16 | use artbox\core\admin\interfaces\ControllerInterface; |
backend/controllers/BlogCategoryController.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | use artbox\core\admin\actions\Create; | 11 | use artbox\core\admin\actions\Create; |
12 | use artbox\core\admin\actions\Delete; | 12 | use artbox\core\admin\actions\Delete; |
13 | - use artbox\core\admin\actions\Index; | 13 | + use backend\actions\Index; |
14 | use artbox\core\admin\actions\Update; | 14 | use artbox\core\admin\actions\Update; |
15 | use artbox\core\admin\actions\View; | 15 | use artbox\core\admin\actions\View; |
16 | use artbox\core\admin\interfaces\ControllerInterface; | 16 | use artbox\core\admin\interfaces\ControllerInterface; |
backend/controllers/BlogTagController.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | use artbox\core\admin\actions\Create; | 11 | use artbox\core\admin\actions\Create; |
12 | use artbox\core\admin\actions\Delete; | 12 | use artbox\core\admin\actions\Delete; |
13 | - use artbox\core\admin\actions\Index; | 13 | + use backend\actions\Index; |
14 | use artbox\core\admin\actions\Update; | 14 | use artbox\core\admin\actions\Update; |
15 | use artbox\core\admin\actions\View; | 15 | use artbox\core\admin\actions\View; |
16 | use artbox\core\admin\interfaces\ControllerInterface; | 16 | use artbox\core\admin\interfaces\ControllerInterface; |
backend/controllers/FeedbackController.php
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | namespace backend\controllers; | 3 | namespace backend\controllers; |
4 | 4 | ||
5 | use artbox\core\admin\actions\Delete; | 5 | use artbox\core\admin\actions\Delete; |
6 | - use artbox\core\admin\actions\Index; | 6 | + use backend\actions\Index; |
7 | use artbox\core\admin\actions\View; | 7 | use artbox\core\admin\actions\View; |
8 | use artbox\core\admin\interfaces\ControllerInterface; | 8 | use artbox\core\admin\interfaces\ControllerInterface; |
9 | use artbox\core\admin\widgets\Form; | 9 | use artbox\core\admin\widgets\Form; |
backend/controllers/PageCategoryController.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | use artbox\core\admin\actions\Create; | 11 | use artbox\core\admin\actions\Create; |
12 | use artbox\core\admin\actions\Delete; | 12 | use artbox\core\admin\actions\Delete; |
13 | - use artbox\core\admin\actions\Index; | 13 | + use backend\actions\Index; |
14 | use artbox\core\admin\actions\Update; | 14 | use artbox\core\admin\actions\Update; |
15 | use artbox\core\admin\actions\View; | 15 | use artbox\core\admin\actions\View; |
16 | use artbox\core\admin\interfaces\ControllerInterface; | 16 | use artbox\core\admin\interfaces\ControllerInterface; |
backend/controllers/PageController.php
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | use function array_merge; | 5 | use function array_merge; |
6 | use artbox\core\admin\actions\Create; | 6 | use artbox\core\admin\actions\Create; |
7 | use artbox\core\admin\actions\Delete; | 7 | use artbox\core\admin\actions\Delete; |
8 | - use artbox\core\admin\actions\Index; | 8 | + use backend\actions\Index; |
9 | use artbox\core\admin\actions\Update; | 9 | use artbox\core\admin\actions\Update; |
10 | use artbox\core\admin\actions\View; | 10 | use artbox\core\admin\actions\View; |
11 | use artbox\core\admin\interfaces\ControllerInterface; | 11 | use artbox\core\admin\interfaces\ControllerInterface; |
backend/controllers/SlideController.php
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | use artbox\core\admin\actions\Create; | 11 | use artbox\core\admin\actions\Create; |
12 | use artbox\core\admin\actions\Delete; | 12 | use artbox\core\admin\actions\Delete; |
13 | - use artbox\core\admin\actions\Index; | 13 | + use backend\actions\Index; |
14 | use artbox\core\admin\actions\Update; | 14 | use artbox\core\admin\actions\Update; |
15 | use artbox\core\admin\interfaces\ControllerInterface; | 15 | use artbox\core\admin\interfaces\ControllerInterface; |
16 | use artbox\core\admin\widgets\Form; | 16 | use artbox\core\admin\widgets\Form; |
1 | +<?php | ||
2 | + | ||
3 | + namespace backend\models; | ||
4 | + | ||
5 | + use artbox\core\admin\models\Search as CoreSearch; | ||
6 | + | ||
7 | + class Search extends CoreSearch | ||
8 | + { | ||
9 | + public function attributeLabels() | ||
10 | + { | ||
11 | + $model = \Yii::createObject($this->model); | ||
12 | + | ||
13 | + return call_user_func( | ||
14 | + [ | ||
15 | + $model, | ||
16 | + 'attributeLabels', | ||
17 | + ] | ||
18 | + ); | ||
19 | + } | ||
20 | + } | ||
0 | \ No newline at end of file | 21 | \ No newline at end of file |