@@ -2,22 +2,20 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace app\modules\shop\backend; |
| 4 | 4 | |
| 5 | +use Yii; |
|
| 6 | +use app\backend\actions\DeleteOne; |
|
| 7 | +use app\backend\actions\MultipleDelete; |
|
| 5 | 8 | use app\backend\components\BackendController; |
| 9 | +use app\backend\traits\BackendRedirect; |
|
| 6 | 10 | use app\models\Object; |
| 7 | 11 | use app\modules\shop\models\Addon; |
| 8 | -use app\modules\shop\models\AddonBindings; |
|
| 12 | +use app\modules\shop\models\AddonCategory; |
|
| 9 | 13 | use app\modules\shop\models\Currency; |
| 10 | 14 | use app\modules\shop\widgets\AddonsListWidget; |
| 11 | 15 | use app\traits\LoadModel; |
| 12 | -use app\backend\traits\BackendRedirect; |
|
| 13 | -use app\backend\actions\MultipleDelete; |
|
| 14 | -use app\backend\actions\DeleteOne; |
|
| 15 | -use app\modules\shop\models\AddonCategory; |
|
| 16 | -use Yii; |
|
| 17 | 16 | use yii\caching\TagDependency; |
| 18 | 17 | use yii\filters\AccessControl; |
| 19 | 18 | use yii\helpers\Html; |
| 20 | -use yii\helpers\Url; |
|
| 21 | 19 | use yii\web\BadRequestHttpException; |
| 22 | 20 | use yii\web\NotFoundHttpException; |
| 23 | 21 | use yii\web\Response; |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace app\widgets\options; |
| 4 | 4 | |
| 5 | 5 | use app\models\Property; |
| 6 | -use Yii; |
|
| 7 | 6 | use yii\base\Widget; |
| 8 | 7 | use yii\helpers\ArrayHelper; |
| 9 | 8 | use yii\helpers\Json; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * @return mixed |
|
| 44 | + * @return string |
|
| 45 | 45 | */ |
| 46 | 46 | public function getValue() |
| 47 | 47 | { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | - * @param mixed $value |
|
| 52 | + * @param OfferTag[] $value |
|
| 53 | 53 | * @return $this |
| 54 | 54 | */ |
| 55 | 55 | public function setValue($value) |
@@ -9,9 +9,9 @@ |
||
| 9 | 9 | use app\modules\shop\models\Category; |
| 10 | 10 | use app\modules\shop\models\Currency; |
| 11 | 11 | use app\modules\shop\models\Product; |
| 12 | +use app\modules\shop\models\Yml as YmlModel; |
|
| 12 | 13 | use devgroup\TagDependencyHelper\ActiveRecordHelper; |
| 13 | 14 | use yii\base\Component; |
| 14 | -use app\modules\shop\models\Yml as YmlModel; |
|
| 15 | 15 | use yii\caching\TagDependency; |
| 16 | 16 | use yii\db\Query; |
| 17 | 17 | use yii\helpers\Json; |
@@ -1,16 +1,18 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace app\modules\shop\controllers; |
| 3 | 3 | |
| 4 | +use Yii; |
|
| 4 | 5 | use app\modules\core\behaviors\DisableRobotIndexBehavior; |
| 5 | 6 | use app\modules\core\helpers\EventTriggeringHelper; |
| 6 | 7 | use app\modules\core\models\Events; |
| 8 | +use app\modules\shop\ShopModule; |
|
| 7 | 9 | use app\modules\shop\events\CartActionEvent; |
| 8 | -use app\modules\shop\handlers\CartHandler; |
|
| 9 | -use app\modules\shop\helpers\PriceHelper; |
|
| 10 | 10 | use app\modules\shop\events\OrderStageEvent; |
| 11 | 11 | use app\modules\shop\events\OrderStageLeafEvent; |
| 12 | +use app\modules\shop\handlers\CartHandler; |
|
| 13 | +use app\modules\shop\helpers\CurrencyHelper; |
|
| 14 | +use app\modules\shop\helpers\PriceHelper; |
|
| 12 | 15 | use app\modules\shop\models\Addon; |
| 13 | -use app\modules\shop\models\Currency; |
|
| 14 | 16 | use app\modules\shop\models\Order; |
| 15 | 17 | use app\modules\shop\models\OrderCode; |
| 16 | 18 | use app\modules\shop\models\OrderItem; |
@@ -18,17 +20,12 @@ discard block |
||
| 18 | 20 | use app\modules\shop\models\OrderStageLeaf; |
| 19 | 21 | use app\modules\shop\models\Product; |
| 20 | 22 | use app\modules\shop\models\SpecialPriceList; |
| 21 | -use app\modules\shop\models\UserPreferences; |
|
| 22 | -use app\modules\shop\ShopModule; |
|
| 23 | 23 | use yii\base\Event; |
| 24 | 24 | use yii\helpers\Url; |
| 25 | -use Yii; |
|
| 26 | -use yii\helpers\ArrayHelper; |
|
| 27 | 25 | use yii\web\BadRequestHttpException; |
| 28 | 26 | use yii\web\Controller; |
| 29 | 27 | use yii\web\NotFoundHttpException; |
| 30 | 28 | use yii\web\Response; |
| 31 | -use app\modules\shop\helpers\CurrencyHelper; |
|
| 32 | 29 | |
| 33 | 30 | /** |
| 34 | 31 | * Class CartController |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | * Get OrderItem. |
| 75 | 75 | * @param int $id |
| 76 | 76 | * @param bool $checkOrderAttachment |
| 77 | - * @return OrderItem |
|
| 77 | + * @return null|Order |
|
| 78 | 78 | * @throws NotFoundHttpException |
| 79 | 79 | */ |
| 80 | 80 | protected function loadOrderItem($id, $checkOrderAttachment = true) |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace app\widgets\navigation\models; |
| 4 | 4 | |
| 5 | +use Yii; |
|
| 5 | 6 | use app\backgroundtasks\traits\SearchModelTrait; |
| 6 | 7 | use app\behaviors\Tree; |
| 7 | 8 | use app\properties\HasProperties; |
| 8 | 9 | use app\traits\FindById; |
| 9 | 10 | use app\traits\GetImages; |
| 10 | -use Yii; |
|
| 11 | 11 | use yii\data\ActiveDataProvider; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -4,9 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Ivory\HttpAdapter\HttpAdapterInterface; |
| 6 | 6 | use Yii; |
| 7 | -use yii\helpers\ArrayHelper; |
|
| 8 | -use yii\helpers\Json; |
|
| 9 | 7 | use yii\data\ActiveDataProvider; |
| 8 | +use yii\helpers\Json; |
|
| 10 | 9 | |
| 11 | 10 | /** |
| 12 | 11 | * Model for storing name and params of Currency Rate Providers |
@@ -2,16 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace app\modules\shop\models; |
| 4 | 4 | |
| 5 | +use Yii; |
|
| 5 | 6 | use app\behaviors\Tree; |
| 6 | 7 | use app\modules\shop\components\AbstractEntity; |
| 7 | -use app\modules\shop\components\AddonOrderItemEntityFactory; |
|
| 8 | -use app\modules\shop\components\CustomOrderItemEntityFactory; |
|
| 9 | 8 | use app\modules\shop\components\EntityFactory; |
| 10 | -use app\modules\shop\components\ProductOrderItemEntityFactory; |
|
| 11 | 9 | use app\modules\shop\helpers\PriceHelper; |
| 12 | 10 | use app\properties\HasProperties; |
| 13 | 11 | use devgroup\TagDependencyHelper\ActiveRecordHelper; |
| 14 | -use Yii; |
|
| 15 | 12 | use yii\db\ActiveRecord; |
| 16 | 13 | |
| 17 | 14 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | - * @return Product|null |
|
| 136 | + * @return \yii\db\ActiveQuery |
|
| 137 | 137 | */ |
| 138 | 138 | public function getProduct() |
| 139 | 139 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * @return Addon|null |
|
| 144 | + * @return \yii\db\ActiveQuery |
|
| 145 | 145 | */ |
| 146 | 146 | public function getAddon() |
| 147 | 147 | { |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | - * @return Order|null |
|
| 152 | + * @return \yii\db\ActiveQuery |
|
| 153 | 153 | */ |
| 154 | 154 | public function getOrder() |
| 155 | 155 | { |
@@ -2,29 +2,29 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace app\modules\shop\models; |
| 4 | 4 | |
| 5 | +use Yii; |
|
| 5 | 6 | use app\behaviors\CleanRelations; |
| 6 | 7 | use app\behaviors\Tree; |
| 7 | 8 | use app\components\Helper; |
| 8 | -use app\modules\image\models\Image; |
|
| 9 | 9 | use app\models\Object; |
| 10 | -use app\modules\data\components\ImportableInterface; |
|
| 11 | 10 | use app\modules\data\components\ExportableInterface; |
| 12 | -use app\modules\shop\traits\HasAddonTrait; |
|
| 11 | +use app\modules\data\components\ImportableInterface; |
|
| 12 | +use app\modules\image\models\Image; |
|
| 13 | 13 | use app\modules\shop\ShopModule; |
| 14 | +use app\modules\shop\traits\HasAddonTrait; |
|
| 14 | 15 | use app\properties\HasProperties; |
| 15 | 16 | use app\traits\GetImages; |
| 16 | 17 | use devgroup\TagDependencyHelper\ActiveRecordHelper; |
| 17 | -use Yii; |
|
| 18 | 18 | use yii\base\Exception; |
| 19 | 19 | use yii\behaviors\TimestampBehavior; |
| 20 | 20 | use yii\caching\TagDependency; |
| 21 | 21 | use yii\data\ActiveDataProvider; |
| 22 | +use yii\data\Pagination; |
|
| 22 | 23 | use yii\db\ActiveQuery; |
| 23 | 24 | use yii\db\ActiveRecord; |
| 24 | 25 | use yii\db\Expression; |
| 25 | 26 | use yii\db\Query; |
| 26 | 27 | use yii\helpers\ArrayHelper; |
| 27 | -use yii\data\Pagination; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * This is the model class for table "product". |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | /** |
| 241 | 241 | * Returns model instance by ID using per-request Identity Map and cache |
| 242 | 242 | * @param $id |
| 243 | - * @param int $is_active Return only active |
|
| 243 | + * @param int $isActive Return only active |
|
| 244 | 244 | * @return Product |
| 245 | 245 | */ |
| 246 | 246 | public static function findById($id, $isActive = 1) |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /** |
| 330 | - * @return Category|null |
|
| 330 | + * @return ActiveQuery |
|
| 331 | 331 | */ |
| 332 | 332 | public function getCategory() |
| 333 | 333 | { |
@@ -1074,7 +1074,7 @@ discard block |
||
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | /** |
| 1077 | - * @param int|Category|null $category |
|
| 1077 | + * @param integer $category |
|
| 1078 | 1078 | * @param bool $asMainCategory |
| 1079 | 1079 | * @return bool |
| 1080 | 1080 | * @throws \yii\db\Exception |