Commit 46edaac375eabec14577f5c9e895d9bc41ce0e8a
1 parent
c882dc75
Namespaces
Showing
19 changed files
with
44 additions
and
44 deletions
Show diff stats
Module.php
composer.json
@@ -5,11 +5,12 @@ | @@ -5,11 +5,12 @@ | ||
5 | "require": { | 5 | "require": { |
6 | "php": ">=7.0", | 6 | "php": ">=7.0", |
7 | "yiisoft/yii2": "*", | 7 | "yiisoft/yii2": "*", |
8 | - "developeruz/yii2-db-rbac": "*" | 8 | + "artweb/artbox": "dev-master", |
9 | + "artweb/artbox/language": "dev-master" | ||
9 | }, | 10 | }, |
10 | "autoload": { | 11 | "autoload": { |
11 | "psr-4": { | 12 | "psr-4": { |
12 | - "artweb\\artbox\\seo\": "" | 13 | + "artweb\\artbox\\design\": "" |
13 | } | 14 | } |
14 | } | 15 | } |
15 | } | 16 | } |
16 | \ No newline at end of file | 17 | \ No newline at end of file |
controllers/BannerController.php
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | namespace backend\controllers; | 3 | namespace backend\controllers; |
4 | 4 | ||
5 | use Yii; | 5 | use Yii; |
6 | - use common\models\Banner; | ||
7 | - use common\models\BannerSearch; | 6 | + use artweb\artbox\design\models\Banner; |
7 | + use artweb\artbox\design\models\BannerSearch; | ||
8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
controllers/BgController.php
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | namespace backend\controllers; | 3 | namespace backend\controllers; |
4 | 4 | ||
5 | use Yii; | 5 | use Yii; |
6 | - use common\models\Bg; | ||
7 | - use common\models\BgSearch; | 6 | + use artweb\artbox\design\models\Bg; |
7 | + use artweb\artbox\design\models\BgSearch; | ||
8 | use yii\web\Controller; | 8 | use yii\web\Controller; |
9 | use yii\web\NotFoundHttpException; | 9 | use yii\web\NotFoundHttpException; |
10 | use yii\filters\VerbFilter; | 10 | use yii\filters\VerbFilter; |
controllers/SliderController.php
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | namespace backend\controllers; | 3 | namespace backend\controllers; |
4 | 4 | ||
5 | use Yii; | 5 | use Yii; |
6 | - use common\models\Slider; | ||
7 | - use common\models\SliderSearch; | 6 | + use artweb\artbox\design\models\Slider; |
7 | + use artweb\artbox\design\models\SliderSearch; | ||
8 | use yii\db\ActiveQuery; | 8 | use yii\db\ActiveQuery; |
9 | use yii\web\Controller; | 9 | use yii\web\Controller; |
10 | use yii\web\NotFoundHttpException; | 10 | use yii\web\NotFoundHttpException; |
controllers/SliderImageController.php
@@ -3,10 +3,10 @@ | @@ -3,10 +3,10 @@ | ||
3 | namespace backend\controllers; | 3 | namespace backend\controllers; |
4 | 4 | ||
5 | use developeruz\db_rbac\behaviors\AccessBehavior; | 5 | use developeruz\db_rbac\behaviors\AccessBehavior; |
6 | - use common\models\Slider; | 6 | + use artweb\artbox\design\models\Slider; |
7 | use Yii; | 7 | use Yii; |
8 | - use common\models\SliderImage; | ||
9 | - use common\models\SliderImageSearch; | 8 | + use artweb\artbox\design\models\SliderImage; |
9 | + use artweb\artbox\design\models\SliderImageSearch; | ||
10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
11 | use yii\web\NotFoundHttpException; | 11 | use yii\web\NotFoundHttpException; |
12 | use yii\filters\VerbFilter; | 12 | use yii\filters\VerbFilter; |
models/Banner.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | - use common\modules\language\behaviors\LanguageBehavior; | 5 | + use artweb\artbox\language\behaviors\LanguageBehavior; |
6 | use Yii; | 6 | use Yii; |
7 | use yii\db\ActiveQuery; | 7 | use yii\db\ActiveQuery; |
8 | use yii\db\ActiveRecord; | 8 | use yii\db\ActiveRecord; |
models/BannerLang.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | - use common\behaviors\SaveImgBehavior; | ||
6 | - use common\modules\language\models\Language; | 5 | + use artweb\artbox\behaviors\SaveImgBehavior; |
6 | + use artweb\artbox\language\models\Language; | ||
7 | use Yii; | 7 | use Yii; |
8 | use yii\db\ActiveRecord; | 8 | use yii\db\ActiveRecord; |
9 | 9 |
models/BannerSearch.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | use yii\base\Model; | 5 | use yii\base\Model; |
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | - * BannerSearch represents the model behind the search form about `common\models\Banner`. | 9 | + * BannerSearch represents the model behind the search form about `artweb\artbox\design\models\Banner`. |
10 | */ | 10 | */ |
11 | class BannerSearch extends Banner | 11 | class BannerSearch extends Banner |
12 | { | 12 | { |
models/Bg.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | - use common\behaviors\SaveImgBehavior; | ||
6 | - use common\modules\language\behaviors\LanguageBehavior; | 5 | + use artweb\artbox\behaviors\SaveImgBehavior; |
6 | + use artweb\artbox\language\behaviors\LanguageBehavior; | ||
7 | use yii\db\ActiveQuery; | 7 | use yii\db\ActiveQuery; |
8 | use yii\db\ActiveRecord; | 8 | use yii\db\ActiveRecord; |
9 | use yii\web\Request; | 9 | use yii\web\Request; |
models/BgLang.php
models/BgSearch.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | use yii\base\Model; | 5 | use yii\base\Model; |
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | - * BgSearch represents the model behind the search form about `common\models\Bg`. | 9 | + * BgSearch represents the model behind the search form about `artweb\artbox\design\models\Bg`. |
10 | */ | 10 | */ |
11 | class BgSearch extends Bg | 11 | class BgSearch extends Bg |
12 | { | 12 | { |
models/Slider.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | use Yii; | 5 | use Yii; |
6 | use yii\db\ActiveRecord; | 6 | use yii\db\ActiveRecord; |
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | [ | 60 | [ |
61 | 'title', | 61 | 'title', |
62 | 'unique', | 62 | 'unique', |
63 | - 'targetClass' => '\common\models\Slider', | 63 | + 'targetClass' => '\artweb\artbox\design\models\Slider', |
64 | 'message' => Yii::t( | 64 | 'message' => Yii::t( |
65 | 'app', | 65 | 'app', |
66 | 'message', | 66 | 'message', |
models/SliderImage.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | - use common\behaviors\SaveImgBehavior; | ||
6 | - use common\modules\language\behaviors\LanguageBehavior; | 5 | + use artweb\artbox\behaviors\SaveImgBehavior; |
6 | + use artweb\artbox\language\behaviors\LanguageBehavior; | ||
7 | use Yii; | 7 | use Yii; |
8 | use yii\db\ActiveQuery; | 8 | use yii\db\ActiveQuery; |
9 | use yii\db\ActiveRecord; | 9 | use yii\db\ActiveRecord; |
models/SliderImageLang.php
models/SliderImageSearch.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | use yii\base\Model; | 5 | use yii\base\Model; |
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | * SliderImageSearch represents the model behind the search form about | 9 | * SliderImageSearch represents the model behind the search form about |
10 | - * `common\models\SliderImage`. | 10 | + * `artweb\artbox\design\models\SliderImage`. |
11 | */ | 11 | */ |
12 | class SliderImageSearch extends SliderImage | 12 | class SliderImageSearch extends SliderImage |
13 | { | 13 | { |
models/SliderSearch.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace common\models; | 3 | + namespace artweb\artbox\design\models; |
4 | 4 | ||
5 | use yii\base\Model; | 5 | use yii\base\Model; |
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | - * SliderSearch represents the model behind the search form about `common\models\Slider`. | 9 | + * SliderSearch represents the model behind the search form about `artweb\artbox\design\models\Slider`. |
10 | */ | 10 | */ |
11 | class SliderSearch extends Slider | 11 | class SliderSearch extends Slider |
12 | { | 12 | { |
widgets/Slider.php
@@ -12,14 +12,13 @@ class Slider extends Widget | @@ -12,14 +12,13 @@ class Slider extends Widget | ||
12 | parent::init(); | 12 | parent::init(); |
13 | 13 | ||
14 | } | 14 | } |
15 | - | ||
16 | - | 15 | + |
17 | public function run() | 16 | public function run() |
18 | { | 17 | { |
19 | 18 | ||
20 | 19 | ||
21 | - $slider = \common\models\Slider::find()->where([\common\models\Slider::tableName().'.title'=>$this->title])->joinWith("sliderImage")->one(); | ||
22 | - if($slider instanceof \common\models\Slider){ | 20 | + $slider = \artweb\artbox\design\models\Slider::find()->where([\artweb\artbox\design\models\Slider::tableName().'.title'=>$this->title])->joinWith("sliderImage")->one(); |
21 | + if($slider instanceof \artweb\artbox\design\models\Slider){ | ||
23 | return $this->render('slider',[ | 22 | return $this->render('slider',[ |
24 | 'slider'=>$slider, | 23 | 'slider'=>$slider, |
25 | 'title'=>$this->title | 24 | 'title'=>$this->title |
@@ -30,4 +29,4 @@ class Slider extends Widget | @@ -30,4 +29,4 @@ class Slider extends Widget | ||
30 | 29 | ||
31 | } | 30 | } |
32 | 31 | ||
33 | -} | ||
34 | \ No newline at end of file | 32 | \ No newline at end of file |
33 | +} |
widgets/views/slider.php
1 | <?php | 1 | <?php |
2 | /* @var $slider Slider*/ | 2 | /* @var $slider Slider*/ |
3 | -use common\components\artboximage\ArtboxImageHelper; | ||
4 | -use common\models\Slider; | 3 | +use artweb\artbox\design\components\artboximage\ArtboxImageHelper; |
4 | +use artweb\artbox\design\models\Slider; | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | use frontend\assets\FlipclockAsset; | 7 | use frontend\assets\FlipclockAsset; |