@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace app\modules\shop\controllers; |
4 | 4 | |
5 | -use yii\web\Controller; |
|
6 | 5 | use Yii; |
7 | -use yii\web\Response; |
|
8 | 6 | use app\modules\shop\models\Wishlist; |
9 | -use yii\web\NotFoundHttpException; |
|
10 | -use yii\web\BadRequestHttpException; |
|
11 | 7 | use app\modules\shop\models\WishlistProduct; |
8 | +use yii\web\BadRequestHttpException; |
|
9 | +use yii\web\Controller; |
|
10 | +use yii\web\NotFoundHttpException; |
|
11 | +use yii\web\Response; |
|
12 | 12 | |
13 | 13 | class WishlistController extends Controller |
14 | 14 | { |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace app\modules\shop\models; |
4 | 4 | |
5 | -use yii\db\ActiveRecord; |
|
6 | 5 | use Yii; |
7 | -use app\modules\user\models\User; |
|
8 | -use app\modules\shop\models\WishlistProduct; |
|
9 | 6 | use app\modules\shop\models\Currency; |
7 | +use app\modules\shop\models\WishlistProduct; |
|
8 | +use app\modules\user\models\User; |
|
9 | +use yii\db\ActiveRecord; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * This is the model class for table "{{%wishlist}}". |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @return User|null |
|
76 | + * @return \yii\db\ActiveQuery |
|
77 | 77 | */ |
78 | 78 | public function getUser() |
79 | 79 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
84 | - * @return WishlistProduct[]|null |
|
84 | + * @return \yii\db\ActiveQuery |
|
85 | 85 | */ |
86 | 86 | public function getItems() |
87 | 87 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * @param $user_id |
93 | 93 | * @param array $wishlist_ids |
94 | - * @return array |
|
94 | + * @return \yii\db\BaseActiveRecord[] |
|
95 | 95 | */ |
96 | 96 | public static function getWishlist($user_id, $wishlist_ids) |
97 | 97 | { |
@@ -2,6 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace app\modules\shop\controllers; |
4 | 4 | |
5 | +use Yii; |
|
5 | 6 | use app\components\Controller; |
6 | 7 | use app\extensions\DefaultTheme\components\BaseWidget; |
7 | 8 | use app\extensions\DefaultTheme\models\ThemeActiveWidgets; |
@@ -13,13 +14,13 @@ discard block |
||
13 | 14 | use app\modules\core\helpers\ContentBlockHelper; |
14 | 15 | use app\modules\core\helpers\EventTriggeringHelper; |
15 | 16 | use app\modules\core\models\ContentBlock; |
17 | +use app\modules\seo\behaviors\SetCanonicalBehavior; |
|
16 | 18 | use app\modules\shop\events\ProductPageShowed; |
17 | 19 | use app\modules\shop\exceptions\EmptyFilterHttpException; |
18 | 20 | use app\modules\shop\models\Category; |
19 | 21 | use app\modules\shop\models\Product; |
20 | 22 | use app\traits\DynamicContentTrait; |
21 | 23 | use devgroup\TagDependencyHelper\ActiveRecordHelper; |
22 | -use Yii; |
|
23 | 24 | use yii\caching\TagDependency; |
24 | 25 | use yii\data\Pagination; |
25 | 26 | use yii\helpers\ArrayHelper; |
@@ -29,7 +30,6 @@ discard block |
||
29 | 30 | use yii\web\NotFoundHttpException; |
30 | 31 | use yii\web\Response; |
31 | 32 | use yii\web\ServerErrorHttpException; |
32 | -use app\modules\seo\behaviors\SetCanonicalBehavior; |
|
33 | 33 | |
34 | 34 | class ProductController extends Controller |
35 | 35 | { |
@@ -80,6 +80,9 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | |
83 | + /** |
|
84 | + * @param string $relationName |
|
85 | + */ |
|
83 | 86 | protected static function getRelation($model, $relationName, $default_value = '') |
84 | 87 | { |
85 | 88 | $result = $default_value; |
@@ -2,14 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace app\modules\core; |
4 | 4 | |
5 | +use Yii; |
|
5 | 6 | use app; |
6 | -use app\backend\widgets\FloatingPanel; |
|
7 | 7 | use app\components\BaseModule; |
8 | 8 | use app\modules\core\models\ContentDecorator; |
9 | -use Yii; |
|
10 | 9 | use yii\base\Application; |
11 | 10 | use yii\base\BootstrapInterface; |
12 | -use yii\base\Event; |
|
13 | 11 | |
14 | 12 | /** |
15 | 13 | * Core module handles base DotPlant2 functions |
@@ -2,22 +2,22 @@ |
||
2 | 2 | |
3 | 3 | namespace app\modules\page\controllers; |
4 | 4 | |
5 | +use Yii; |
|
5 | 6 | use app\components\Controller; |
7 | +use app\models\Search; |
|
6 | 8 | use app\modules\core\helpers\ContentBlockHelper; |
7 | 9 | use app\modules\core\models\ContentBlock; |
8 | 10 | use app\modules\page\models\Page; |
9 | -use app\models\Search; |
|
11 | +use app\modules\seo\behaviors\SetCanonicalBehavior; |
|
10 | 12 | use app\traits\LoadModel; |
11 | 13 | use devgroup\TagDependencyHelper\ActiveRecordHelper; |
12 | -use Yii; |
|
13 | 14 | use yii\caching\TagDependency; |
14 | 15 | use yii\data\Pagination; |
15 | 16 | use yii\db\ActiveQuery; |
17 | +use yii\helpers\Url; |
|
16 | 18 | use yii\web\ForbiddenHttpException; |
17 | 19 | use yii\web\NotFoundHttpException; |
18 | 20 | use yii\web\Response; |
19 | -use app\modules\seo\behaviors\SetCanonicalBehavior; |
|
20 | -use yii\helpers\Url; |
|
21 | 21 | |
22 | 22 | class PageController extends Controller |
23 | 23 | { |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | +use app\backend\components\ActiveForm; |
|
3 | 4 | use app\backend\widgets\BackendWidget; |
5 | +use app\backend\widgets\GridView; |
|
4 | 6 | use app\modules\shop\controllers\BackendProductController; |
5 | 7 | use app\modules\shop\models\Product; |
6 | -use app\backend\widgets\GridView; |
|
7 | 8 | use kartik\helpers\Html; |
8 | 9 | use kartik\icons\Icon; |
9 | -use app\backend\components\ActiveForm; |
|
10 | 10 | use kartik\widgets\DateTimePicker; |
11 | 11 | use yii\data\ActiveDataProvider; |
12 | 12 | use yii\helpers\Url; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace app\backend\clients; |
4 | 4 | |
5 | 5 | use app\backend\models\ApiService; |
6 | -use Yii; |
|
7 | 6 | use yii\authclient\OAuthToken; |
8 | 7 | |
9 | 8 | class YandexWebmasterOAuth extends \yii\authclient\clients\YandexOAuth |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace app\backend\controllers; |
4 | 4 | |
5 | +use Yii; |
|
5 | 6 | use app\backend\actions\FlushCacheAction; |
6 | 7 | use app\backend\models\Notification; |
7 | 8 | use app\components\Helper; |
8 | 9 | use app\modules\image\actions\UpdateNameAction; |
9 | 10 | use vova07\imperavi\actions\GetAction; |
10 | -use Yii; |
|
11 | 11 | use yii\filters\AccessControl; |
12 | 12 | use yii\web\Controller; |
13 | 13 | use yii\web\NotFoundHttpException; |