| Total Complexity | 137 |
| Total Lines | 1495 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like Product often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Product, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 24 | class Product implements ProductInterface |
||
| 25 | { |
||
| 26 | use ProductTrait; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var int |
||
| 30 | * |
||
| 31 | * @ORM\Id |
||
| 32 | * @ORM\GeneratedValue |
||
| 33 | * @ORM\Column(type="integer") |
||
| 34 | **/ |
||
| 35 | protected $id; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var int |
||
| 39 | * |
||
| 40 | * @ORM\Column(type="integer", unique=true) |
||
| 41 | */ |
||
| 42 | protected $externalId; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @var string|null |
||
| 46 | * |
||
| 47 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 48 | */ |
||
| 49 | protected $barCodeNumber; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @var array|null |
||
| 53 | * |
||
| 54 | * @ORM\Column(nullable=true, type="json") |
||
| 55 | */ |
||
| 56 | protected $categoryIdList; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @var string|null |
||
| 60 | * |
||
| 61 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 62 | */ |
||
| 63 | protected $comments; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @var float|null |
||
| 67 | * |
||
| 68 | * @ORM\Column(nullable=true, type="decimal", precision=12, scale=2) |
||
| 69 | */ |
||
| 70 | protected $costPrice; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @var \DateTimeImmutable|null |
||
| 74 | * |
||
| 75 | * @ORM\Column(nullable=true, type="datetime_immutable") |
||
| 76 | */ |
||
| 77 | protected $created; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @var string|null |
||
| 81 | * |
||
| 82 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 83 | */ |
||
| 84 | protected $createdBy; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @var int|null |
||
| 88 | * |
||
| 89 | * @ORM\Column(nullable=true, type="integer") |
||
| 90 | */ |
||
| 91 | protected $defaultCategoryId; |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @var array|null |
||
| 95 | * |
||
| 96 | * @ORM\Column(nullable=true, type="json") |
||
| 97 | */ |
||
| 98 | protected $disabledVariantIdList; |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @var string|null |
||
| 102 | * |
||
| 103 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 104 | */ |
||
| 105 | protected $edbPriserProductNumber; |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @var string|null |
||
| 109 | * |
||
| 110 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 111 | */ |
||
| 112 | protected $fileSaleLink; |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @var string|null |
||
| 116 | * |
||
| 117 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 118 | */ |
||
| 119 | protected $googleFeedCategory; |
||
| 120 | |||
| 121 | /** |
||
| 122 | * @var bool|null |
||
| 123 | * |
||
| 124 | * @ORM\Column(nullable=true, type="boolean") |
||
| 125 | */ |
||
| 126 | protected $isGiftCertificate; |
||
| 127 | |||
| 128 | /** |
||
| 129 | * @var bool|null |
||
| 130 | * |
||
| 131 | * @ORM\Column(nullable=true, type="boolean") |
||
| 132 | */ |
||
| 133 | protected $isModified; |
||
| 134 | |||
| 135 | /** |
||
| 136 | * @var bool|null |
||
| 137 | * |
||
| 138 | * @ORM\Column(nullable=true, type="boolean") |
||
| 139 | */ |
||
| 140 | protected $isRateVariants; |
||
| 141 | |||
| 142 | /** |
||
| 143 | * @var bool|null |
||
| 144 | * |
||
| 145 | * @ORM\Column(nullable=true, type="boolean") |
||
| 146 | */ |
||
| 147 | protected $isReviewVariants; |
||
| 148 | |||
| 149 | /** |
||
| 150 | * @var bool|null |
||
| 151 | * |
||
| 152 | * @ORM\Column(nullable=true, type="boolean") |
||
| 153 | */ |
||
| 154 | protected $isVariantMaster; |
||
| 155 | |||
| 156 | /** |
||
| 157 | * @var string|null |
||
| 158 | * |
||
| 159 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 160 | */ |
||
| 161 | protected $locationNumber; |
||
| 162 | |||
| 163 | /** |
||
| 164 | * @var array|null |
||
| 165 | * |
||
| 166 | * @ORM\Column(nullable=true, type="json") |
||
| 167 | */ |
||
| 168 | protected $manufacturereIdList; |
||
| 169 | |||
| 170 | /** |
||
| 171 | * @var int|null |
||
| 172 | * |
||
| 173 | * @ORM\Column(nullable=true, type="integer") |
||
| 174 | */ |
||
| 175 | protected $maxBuyAmount; |
||
| 176 | |||
| 177 | /** |
||
| 178 | * @var int|null |
||
| 179 | * |
||
| 180 | * @ORM\Column(nullable=true, type="integer") |
||
| 181 | */ |
||
| 182 | protected $minBuyAmount; |
||
| 183 | |||
| 184 | /** |
||
| 185 | * @var int|null |
||
| 186 | * |
||
| 187 | * @ORM\Column(nullable=true, type="integer") |
||
| 188 | */ |
||
| 189 | protected $minBuyAmountB2B; |
||
| 190 | |||
| 191 | /** |
||
| 192 | * The product number |
||
| 193 | * |
||
| 194 | * @var string|null |
||
| 195 | * |
||
| 196 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 197 | */ |
||
| 198 | protected $number; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * @var string|null |
||
| 202 | * |
||
| 203 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 204 | */ |
||
| 205 | protected $picture; |
||
| 206 | |||
| 207 | /** |
||
| 208 | * @var int|null |
||
| 209 | * |
||
| 210 | * @ORM\Column(nullable=true, type="integer") |
||
| 211 | */ |
||
| 212 | protected $salesCount; |
||
| 213 | |||
| 214 | /** |
||
| 215 | * @var array|null |
||
| 216 | * |
||
| 217 | * @ORM\Column(nullable=true, type="json") |
||
| 218 | */ |
||
| 219 | protected $segmentIdList; |
||
| 220 | |||
| 221 | /** |
||
| 222 | * @var int|null |
||
| 223 | * |
||
| 224 | * @ORM\Column(nullable=true, type="integer") |
||
| 225 | */ |
||
| 226 | protected $sortOrder; |
||
| 227 | |||
| 228 | /** |
||
| 229 | * @var int|null |
||
| 230 | * |
||
| 231 | * @ORM\Column(nullable=true, type="integer") |
||
| 232 | */ |
||
| 233 | protected $stockCount; |
||
| 234 | |||
| 235 | /** |
||
| 236 | * @var int|null |
||
| 237 | * |
||
| 238 | * @ORM\Column(nullable=true, type="integer") |
||
| 239 | */ |
||
| 240 | protected $stockLimit; |
||
| 241 | |||
| 242 | /** |
||
| 243 | * @var int|null |
||
| 244 | * |
||
| 245 | * @ORM\Column(nullable=true, type="integer") |
||
| 246 | */ |
||
| 247 | protected $typeId; |
||
| 248 | |||
| 249 | /** |
||
| 250 | * @var \DateTimeImmutable|null |
||
| 251 | * |
||
| 252 | * @ORM\Column(nullable=true, type="datetime_immutable") |
||
| 253 | */ |
||
| 254 | protected $updated; |
||
| 255 | |||
| 256 | /** |
||
| 257 | * @var string|null |
||
| 258 | * |
||
| 259 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 260 | */ |
||
| 261 | protected $updatedBy; |
||
| 262 | |||
| 263 | /** |
||
| 264 | * @var array|null |
||
| 265 | * |
||
| 266 | * @ORM\Column(nullable=true, type="json") |
||
| 267 | */ |
||
| 268 | protected $variantGroupIdList; |
||
| 269 | |||
| 270 | /** |
||
| 271 | * @var array|null |
||
| 272 | * |
||
| 273 | * @ORM\Column(nullable=true, type="json") |
||
| 274 | */ |
||
| 275 | protected $variantIdList; |
||
| 276 | |||
| 277 | /** |
||
| 278 | * @var int|null |
||
| 279 | * |
||
| 280 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 281 | */ |
||
| 282 | protected $variantMasterId; |
||
| 283 | |||
| 284 | /** |
||
| 285 | * @var string|null |
||
| 286 | * |
||
| 287 | * @ORM\Column(nullable=true, type="string", length=191) |
||
| 288 | */ |
||
| 289 | protected $vendorNumber; |
||
| 290 | |||
| 291 | /** |
||
| 292 | * @var int|null |
||
| 293 | * |
||
| 294 | * @ORM\Column(nullable=true, type="integer") |
||
| 295 | */ |
||
| 296 | protected $weight; |
||
| 297 | |||
| 298 | /** |
||
| 299 | * @var Category[]|ArrayCollection |
||
| 300 | */ |
||
| 301 | protected $categories; |
||
| 302 | |||
| 303 | /** |
||
| 304 | * @var Variant[]|ArrayCollection |
||
| 305 | */ |
||
| 306 | protected $disabledVariants; |
||
| 307 | |||
| 308 | /** |
||
| 309 | * @var Manufacturer[]|ArrayCollection |
||
| 310 | */ |
||
| 311 | protected $manufacturers; |
||
| 312 | |||
| 313 | /** |
||
| 314 | * @var Medium[]|ArrayCollection |
||
| 315 | */ |
||
| 316 | protected $media; |
||
| 317 | |||
| 318 | /** |
||
| 319 | * @var Price[]|ArrayCollection |
||
| 320 | */ |
||
| 321 | protected $prices; |
||
| 322 | |||
| 323 | /** |
||
| 324 | * @var ProductRelation[]|ArrayCollection |
||
| 325 | */ |
||
| 326 | protected $productRelations; |
||
| 327 | |||
| 328 | /** |
||
| 329 | * @var ProductType |
||
| 330 | */ |
||
| 331 | protected $productType; |
||
| 332 | |||
| 333 | /** |
||
| 334 | * @var Segment[]|ArrayCollection |
||
| 335 | */ |
||
| 336 | protected $segments; |
||
| 337 | |||
| 338 | /** |
||
| 339 | * @var VariantGroup[]|ArrayCollection |
||
| 340 | */ |
||
| 341 | protected $variantGroups; |
||
| 342 | |||
| 343 | /** |
||
| 344 | * @var Variant[]|ArrayCollection |
||
| 345 | */ |
||
| 346 | protected $variants; |
||
| 347 | |||
| 348 | public function __construct() |
||
| 349 | { |
||
| 350 | $this->categories = new ArrayCollection(); |
||
| 351 | $this->disabledVariants = new ArrayCollection(); |
||
| 352 | $this->manufacturers = new ArrayCollection(); |
||
| 353 | $this->media = new ArrayCollection(); |
||
| 354 | $this->prices = new ArrayCollection(); |
||
| 355 | $this->productRelations = new ArrayCollection(); |
||
| 356 | $this->segments = new ArrayCollection(); |
||
| 357 | $this->variants = new ArrayCollection(); |
||
| 358 | $this->variantGroups = new ArrayCollection(); |
||
| 359 | } |
||
| 360 | |||
| 361 | public function addDisabledVariant(VariantInterface $variant) : ProductInterface |
||
| 362 | { |
||
| 363 | if(!$this->disabledVariants->contains($variant)) { |
||
| 364 | $this->disabledVariants->add($variant); |
||
| 365 | } |
||
| 366 | |||
| 367 | return $this; |
||
| 368 | } |
||
| 369 | |||
| 370 | public function addMedium(MediumInterface $medium) : ProductInterface |
||
| 371 | { |
||
| 372 | if(!$this->media->contains($medium)) { |
||
| 373 | $this->media->add($medium); |
||
| 374 | } |
||
| 375 | } |
||
| 376 | |||
| 377 | public function addCategory(CategoryInterface $category) : ProductInterface |
||
| 378 | { |
||
| 379 | if(!$this->categories->contains($category)) { |
||
| 380 | $this->categories->add($category); |
||
| 381 | } |
||
| 382 | } |
||
| 383 | |||
| 384 | public function addManufacturer(ManufacturerInterface $manufacturer) : ProductInterface |
||
| 385 | { |
||
| 386 | if(!$this->manufacturers->contains($manufacturer)) { |
||
| 387 | $this->manufacturers->add($manufacturer); |
||
| 388 | } |
||
| 389 | } |
||
| 390 | |||
| 391 | public function addPrice(PriceInterface $price) : ProductInterface |
||
| 392 | { |
||
| 393 | if(!$this->prices->contains($price)) { |
||
| 394 | $this->prices->add($price); |
||
| 395 | } |
||
| 396 | } |
||
| 397 | |||
| 398 | public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface |
||
| 399 | { |
||
| 400 | if(!$this->productRelations->contains($productRelation)) { |
||
| 401 | $this->productRelations->add($productRelation); |
||
| 402 | } |
||
| 403 | } |
||
| 404 | |||
| 405 | public function addSegment(SegmentInterface $segment) : ProductInterface |
||
| 406 | { |
||
| 407 | if(!$this->segments->contains($segment)) { |
||
| 408 | $this->segments->add($segment); |
||
| 409 | } |
||
| 410 | } |
||
| 411 | |||
| 412 | public function addVariant(VariantInterface $variant) : ProductInterface |
||
| 413 | { |
||
| 414 | if(!$this->variants->contains($variant)) { |
||
| 415 | $this->variants->add($variant); |
||
| 416 | } |
||
| 417 | } |
||
| 418 | |||
| 419 | public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface |
||
| 420 | { |
||
| 421 | if(!$this->variantGroups->contains($variantGroup)) { |
||
| 422 | $this->variantGroups->add($variantGroup); |
||
| 423 | } |
||
| 424 | } |
||
| 425 | |||
| 426 | /** |
||
| 427 | * Populates a product based on the response from the Dandomain API |
||
| 428 | * |
||
| 429 | * See the properties here: |
||
| 430 | * http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductDataService/help/operations/GetDataProduct |
||
| 431 | * |
||
| 432 | * @param \stdClass|array $data |
||
| 433 | */ |
||
| 434 | public function populateFromApiResponse($data) |
||
| 435 | { |
||
| 436 | $data = DandomainFoundation\objectToArray($data); |
||
| 437 | |||
| 438 | if ($data['created']) { |
||
| 439 | $this->created = DateTimeImmutable::createFromJson($data['created']); |
||
| 440 | } |
||
| 441 | |||
| 442 | if ($data['updated']) { |
||
| 443 | $this->updated = DateTimeImmutable::createFromJson($data['updated']); |
||
| 444 | } |
||
| 445 | |||
| 446 | $this |
||
| 447 | ->setBarCodeNumber($data['barCodeNumber']) |
||
| 448 | ->setCategoryIdList($data['categoryIdList']) |
||
| 449 | ->setComments($data['comments']) |
||
| 450 | ->setCostPrice($data['costPrice']) |
||
| 451 | ->setCreatedBy($data['createdBy']) |
||
| 452 | ->setDefaultCategoryId($data['defaultCategoryId']) |
||
| 453 | ->setDisabledVariantIdList($data['disabledVariantIdList']) |
||
| 454 | ->setEdbPriserProductNumber($data['edbPriserProductNumber']) |
||
| 455 | ->setExternalId($data['id']) |
||
| 456 | ->setFileSaleLink($data['fileSaleLink']) |
||
| 457 | ->setGoogleFeedCategory($data['googleFeedCategory']) |
||
| 458 | ->setIsGiftCertificate($data['isGiftCertificate']) |
||
| 459 | ->setIsModified($data['isModified']) |
||
| 460 | ->setIsRateVariants($data['isRateVariants']) |
||
| 461 | ->setIsReviewVariants($data['isReviewVariants']) |
||
| 462 | ->setIsVariantMaster($data['isVariantMaster']) |
||
| 463 | ->setLocationNumber($data['locationNumber']) |
||
| 464 | ->setManufacturereIdList($data['manufacturereIdList']) |
||
| 465 | ->setMaxBuyAmount($data['maxBuyAmount']) |
||
| 466 | ->setMinBuyAmount($data['minBuyAmount']) |
||
| 467 | ->setMinBuyAmountB2B($data['minBuyAmountB2B']) |
||
| 468 | ->setNumber($data['number']) |
||
| 469 | ->setPicture($data['picture']) |
||
| 470 | ->setSalesCount($data['salesCount']) |
||
| 471 | ->setSegmentIdList($data['segmentIdList']) |
||
| 472 | ->setSortOrder($data['sortOrder']) |
||
| 473 | ->setStockCount($data['stockCount']) |
||
| 474 | ->setStockLimit($data['stockLimit']) |
||
| 475 | ->setTypeId($data['typeId']) |
||
| 476 | ->setUpdatedBy($data['updatedBy']) |
||
| 477 | ->setVariantGroupIdList($data['variantGroupIdList']) |
||
| 478 | ->setVariantIdList($data['variantIdList']) |
||
| 479 | ->setVariantMasterId($data['variantMasterId']) |
||
| 480 | ->setVendorNumber($data['vendorNumber']) |
||
| 481 | ->setWeight($data['weight']) |
||
| 482 | ; |
||
| 483 | |||
| 484 | if (is_array($data['disabledVariants'])) { |
||
| 485 | foreach ($data['disabledVariants'] as $disabledVariantData) { |
||
| 486 | $disabledVariant = new Variant(); |
||
| 487 | $disabledVariant->populateFromApiResponse($disabledVariantData); |
||
| 488 | $this->addDisabledVariant($disabledVariant); |
||
| 489 | } |
||
| 490 | } |
||
| 491 | |||
| 492 | if (is_array($data['media'])) { |
||
| 493 | foreach ($data['media'] as $mediaTmp) { |
||
| 494 | $medium = new Medium(); |
||
| 495 | $medium->populateFromApiResponse($mediaTmp); |
||
| 496 | $this->addMedium($medium); |
||
| 497 | } |
||
| 498 | } |
||
| 499 | |||
| 500 | if (is_array($data['productCategories'])) { |
||
| 501 | foreach ($data['productCategories'] as $categoryData) { |
||
| 502 | $category = new Category(); |
||
| 503 | $category->populateFromApiResponse($categoryData); |
||
| 504 | $this->addCategory($category); |
||
| 505 | } |
||
| 506 | } |
||
| 507 | |||
| 508 | if (is_array($data['manufacturers'])) { |
||
| 509 | foreach ($data['manufacturers'] as $manufacturerData) { |
||
| 510 | $manufacturer = new Manufacturer(); |
||
| 511 | $manufacturer->populateFromApiResponse($manufacturerData); |
||
|
|
|||
| 512 | $this->addManufacturer($manufacturer); |
||
| 513 | } |
||
| 514 | } |
||
| 515 | |||
| 516 | if (is_array($data['prices'])) { |
||
| 517 | foreach ($data['prices'] as $priceData) { |
||
| 518 | $price = new Price(); |
||
| 519 | $price->populateFromApiResponse($priceData); |
||
| 520 | $this->addPrice($price); |
||
| 521 | } |
||
| 522 | } |
||
| 523 | |||
| 524 | if (is_array($data['productRelations'])) { |
||
| 525 | foreach ($data['productRelations'] as $productRelationData) { |
||
| 526 | $productRelation = new ProductRelation(); |
||
| 527 | $productRelation->populateFromApiResponse($productRelationData); |
||
| 528 | $this->addProductRelation($productRelation); |
||
| 529 | } |
||
| 530 | } |
||
| 531 | |||
| 532 | if ($data['productType']) { |
||
| 533 | $productType = new ProductType(); |
||
| 534 | $productType->$productRelation($data['productType']); |
||
| 535 | $this->setProductType($productType); |
||
| 536 | } |
||
| 537 | |||
| 538 | if (is_array($data['segments'])) { |
||
| 539 | foreach ($data['segments'] as $segmentData) { |
||
| 540 | $segment = new Segment(); |
||
| 541 | $segment->$productRelation($segmentData); |
||
| 542 | $this->addSegment($segment); |
||
| 543 | } |
||
| 544 | } |
||
| 545 | |||
| 546 | if (is_array($data['variants'])) { |
||
| 547 | foreach ($data['variants'] as $variantData) { |
||
| 548 | $variant = new Variant(); |
||
| 549 | $variant->$productRelation($variantData); |
||
| 550 | $this->addVariant($variant); |
||
| 551 | } |
||
| 552 | } |
||
| 553 | |||
| 554 | if (is_array($data['variantGroups'])) { |
||
| 555 | foreach ($data['variantGroups'] as $variantGroupData) { |
||
| 556 | $variantGroup = new VariantGroup(); |
||
| 557 | $variantGroup->$productRelation($variantGroupData); |
||
| 558 | $this->addVariantGroup($variantGroup); |
||
| 559 | } |
||
| 560 | } |
||
| 561 | |||
| 562 | /* |
||
| 563 | if (($entity instanceof TranslatableInterface) && is_array($data['siteSettings'])) { |
||
| 564 | foreach ($data['siteSettings'] as $siteSettingTmp) { |
||
| 565 | if ($siteSettingTmp->expectedDeliveryTime) { |
||
| 566 | try { |
||
| 567 | $expectedDeliveryTime = \Dandomain\Api\jsonDateToDate($siteSettingTmp->expectedDeliveryTime); |
||
| 568 | $expectedDeliveryTime->setTimezone(new \DateTimeZone('Europe/Copenhagen')); |
||
| 569 | } catch (\Exception $e) { |
||
| 570 | $expectedDeliveryTime = null; |
||
| 571 | } |
||
| 572 | } else { |
||
| 573 | $expectedDeliveryTime = null; |
||
| 574 | } |
||
| 575 | |||
| 576 | if ($siteSettingTmp->expectedDeliveryTimeNotInStock) { |
||
| 577 | try { |
||
| 578 | $expectedDeliveryTimeNotInStock = \Dandomain\Api\jsonDateToDate($siteSettingTmp->expectedDeliveryTimeNotInStock); |
||
| 579 | $expectedDeliveryTimeNotInStock->setTimezone(new \DateTimeZone('Europe/Copenhagen')); |
||
| 580 | } catch (\Exception $e) { |
||
| 581 | $expectedDeliveryTimeNotInStock = null; |
||
| 582 | } |
||
| 583 | } else { |
||
| 584 | $expectedDeliveryTimeNotInStock = null; |
||
| 585 | } |
||
| 586 | |||
| 587 | $entity->translate($siteSettingTmp->siteID)->setCustomField01($siteSettingTmp->customField01); |
||
| 588 | $entity->translate($siteSettingTmp->siteID)->setCustomField02($siteSettingTmp->customField02); |
||
| 589 | $entity->translate($siteSettingTmp->siteID)->setCustomField03($siteSettingTmp->customField03); |
||
| 590 | $entity->translate($siteSettingTmp->siteID)->setCustomField04($siteSettingTmp->customField04); |
||
| 591 | $entity->translate($siteSettingTmp->siteID)->setCustomField05($siteSettingTmp->customField05); |
||
| 592 | $entity->translate($siteSettingTmp->siteID)->setCustomField06($siteSettingTmp->customField06); |
||
| 593 | $entity->translate($siteSettingTmp->siteID)->setCustomField07($siteSettingTmp->customField07); |
||
| 594 | $entity->translate($siteSettingTmp->siteID)->setCustomField08($siteSettingTmp->customField08); |
||
| 595 | $entity->translate($siteSettingTmp->siteID)->setCustomField09($siteSettingTmp->customField09); |
||
| 596 | $entity->translate($siteSettingTmp->siteID)->setCustomField10($siteSettingTmp->customField10); |
||
| 597 | $entity->translate($siteSettingTmp->siteID)->setGiftCertificatePdfBackgroundImage($siteSettingTmp->giftCertificatePdfBackgroundImage); |
||
| 598 | $entity->translate($siteSettingTmp->siteID)->setHidden($siteSettingTmp->hidden); |
||
| 599 | $entity->translate($siteSettingTmp->siteID)->setHiddenForMobile($siteSettingTmp->hiddenForMobile); |
||
| 600 | $entity->translate($siteSettingTmp->siteID)->setImageAltText($siteSettingTmp->imageAltText); |
||
| 601 | $entity->translate($siteSettingTmp->siteID)->setIsToplistHidden($siteSettingTmp->isToplistHidden); |
||
| 602 | $entity->translate($siteSettingTmp->siteID)->setKeyWords($siteSettingTmp->keyWords); |
||
| 603 | $entity->translate($siteSettingTmp->siteID)->setLongDescription($siteSettingTmp->longDescription); |
||
| 604 | $entity->translate($siteSettingTmp->siteID)->setLongDescription2($siteSettingTmp->longDescription2); |
||
| 605 | $entity->translate($siteSettingTmp->siteID)->setMetaDescription($siteSettingTmp->metaDescription); |
||
| 606 | $entity->translate($siteSettingTmp->siteID)->setName($siteSettingTmp->name); |
||
| 607 | $entity->translate($siteSettingTmp->siteID)->setPageTitle($siteSettingTmp->pageTitle); |
||
| 608 | $entity->translate($siteSettingTmp->siteID)->setRememberToBuyTextHeading($siteSettingTmp->rememberToBuyTextHeading); |
||
| 609 | $entity->translate($siteSettingTmp->siteID)->setRememberToBuyTextSubheading($siteSettingTmp->rememberToBuyTextSubheading); |
||
| 610 | $entity->translate($siteSettingTmp->siteID)->setRetailSalesPrice($siteSettingTmp->retailSalesPrice); |
||
| 611 | $entity->translate($siteSettingTmp->siteID)->setShortDescription($siteSettingTmp->shortDescription); |
||
| 612 | $entity->translate($siteSettingTmp->siteID)->setShowAsNew($siteSettingTmp->showAsNew); |
||
| 613 | $entity->translate($siteSettingTmp->siteID)->setShowOnFrontPage($siteSettingTmp->showOnFrontPage); |
||
| 614 | $entity->translate($siteSettingTmp->siteID)->setSiteId($siteSettingTmp->siteID); |
||
| 615 | $entity->translate($siteSettingTmp->siteID)->setSortOrder($siteSettingTmp->sortOrder); |
||
| 616 | $entity->translate($siteSettingTmp->siteID)->setTechDocLink($siteSettingTmp->techDocLink); |
||
| 617 | $entity->translate($siteSettingTmp->siteID)->setTechDocLink2($siteSettingTmp->techDocLink2); |
||
| 618 | $entity->translate($siteSettingTmp->siteID)->setTechDocLink3($siteSettingTmp->techDocLink3); |
||
| 619 | $entity->translate($siteSettingTmp->siteID)->setUnitNumber($siteSettingTmp->unitNumber); |
||
| 620 | $entity->translate($siteSettingTmp->siteID)->setUrlname($siteSettingTmp->urlname); |
||
| 621 | |||
| 622 | if (null !== $expectedDeliveryTime) { |
||
| 623 | $entity->translate($siteSettingTmp->siteID)->setExpectedDeliveryTime($expectedDeliveryTime); |
||
| 624 | } |
||
| 625 | |||
| 626 | if (null !== $expectedDeliveryTimeNotInStock) { |
||
| 627 | $entity->translate($siteSettingTmp->siteID)->setExpectedDeliveryTimeNotInStock($expectedDeliveryTimeNotInStock); |
||
| 628 | } |
||
| 629 | |||
| 630 | if ($siteSettingTmp->periodFrontPage) { |
||
| 631 | $periodFrontPage = $this->periodSynchronizer->syncPeriod($siteSettingTmp->periodFrontPage, $flush); |
||
| 632 | $entity->translate($siteSettingTmp->siteID)->setPeriodFrontPage($periodFrontPage); |
||
| 633 | } |
||
| 634 | |||
| 635 | if ($siteSettingTmp->periodHidden) { |
||
| 636 | $periodHidden = $this->periodSynchronizer->syncPeriod($siteSettingTmp->periodHidden, $flush); |
||
| 637 | $entity->translate($siteSettingTmp->siteID)->setPeriodHidden($periodHidden); |
||
| 638 | } |
||
| 639 | |||
| 640 | if ($siteSettingTmp->periodNew) { |
||
| 641 | $periodNew = $this->periodSynchronizer->syncPeriod($siteSettingTmp->periodNew, $flush); |
||
| 642 | $entity->translate($siteSettingTmp->siteID)->setPeriodNew($periodNew); |
||
| 643 | } |
||
| 644 | |||
| 645 | if ($siteSettingTmp->unit) { |
||
| 646 | $unit = $this->unitSynchronizer->syncUnit($siteSettingTmp->unit, $flush); |
||
| 647 | $entity->translate($siteSettingTmp->siteID)->setUnit($unit); |
||
| 648 | } |
||
| 649 | |||
| 650 | $entity->mergeNewTranslations(); |
||
| 651 | } |
||
| 652 | } |
||
| 653 | |||
| 654 | */ |
||
| 655 | } |
||
| 656 | |||
| 657 | /** |
||
| 658 | * @return int |
||
| 659 | */ |
||
| 660 | public function getId(): int |
||
| 661 | { |
||
| 662 | return (int)$this->id; |
||
| 663 | } |
||
| 664 | |||
| 665 | /** |
||
| 666 | * @param int $id |
||
| 667 | * @return Product |
||
| 668 | */ |
||
| 669 | public function setId(int $id) |
||
| 670 | { |
||
| 671 | $this->id = $id; |
||
| 672 | return $this; |
||
| 673 | } |
||
| 674 | |||
| 675 | /** |
||
| 676 | * @return int |
||
| 677 | */ |
||
| 678 | public function getExternalId(): int |
||
| 679 | { |
||
| 680 | return (int)$this->externalId; |
||
| 681 | } |
||
| 682 | |||
| 683 | /** |
||
| 684 | * @param int $externalId |
||
| 685 | * @return Product |
||
| 686 | */ |
||
| 687 | public function setExternalId(int $externalId) |
||
| 688 | { |
||
| 689 | $this->externalId = $externalId; |
||
| 690 | return $this; |
||
| 691 | } |
||
| 692 | |||
| 693 | /** |
||
| 694 | * @return null|string |
||
| 695 | */ |
||
| 696 | public function getBarCodeNumber() |
||
| 697 | { |
||
| 698 | return $this->barCodeNumber; |
||
| 699 | } |
||
| 700 | |||
| 701 | /** |
||
| 702 | * @param null|string $barCodeNumber |
||
| 703 | * @return Product |
||
| 704 | */ |
||
| 705 | public function setBarCodeNumber($barCodeNumber) |
||
| 706 | { |
||
| 707 | $this->barCodeNumber = $barCodeNumber; |
||
| 708 | return $this; |
||
| 709 | } |
||
| 710 | |||
| 711 | /** |
||
| 712 | * @return array|null |
||
| 713 | */ |
||
| 714 | public function getCategoryIdList() |
||
| 715 | { |
||
| 716 | return $this->categoryIdList; |
||
| 717 | } |
||
| 718 | |||
| 719 | /** |
||
| 720 | * @param array|null $categoryIdList |
||
| 721 | * @return Product |
||
| 722 | */ |
||
| 723 | public function setCategoryIdList($categoryIdList) |
||
| 724 | { |
||
| 725 | $this->categoryIdList = $categoryIdList; |
||
| 726 | return $this; |
||
| 727 | } |
||
| 728 | |||
| 729 | /** |
||
| 730 | * @return null|string |
||
| 731 | */ |
||
| 732 | public function getComments() |
||
| 733 | { |
||
| 734 | return $this->comments; |
||
| 735 | } |
||
| 736 | |||
| 737 | /** |
||
| 738 | * @param null|string $comments |
||
| 739 | * @return Product |
||
| 740 | */ |
||
| 741 | public function setComments($comments) |
||
| 742 | { |
||
| 743 | $this->comments = $comments; |
||
| 744 | return $this; |
||
| 745 | } |
||
| 746 | |||
| 747 | /** |
||
| 748 | * @return float|null |
||
| 749 | */ |
||
| 750 | public function getCostPrice() |
||
| 751 | { |
||
| 752 | return $this->costPrice; |
||
| 753 | } |
||
| 754 | |||
| 755 | /** |
||
| 756 | * @param float|null $costPrice |
||
| 757 | * @return Product |
||
| 758 | */ |
||
| 759 | public function setCostPrice($costPrice) |
||
| 760 | { |
||
| 761 | $this->costPrice = $costPrice; |
||
| 762 | return $this; |
||
| 763 | } |
||
| 764 | |||
| 765 | /** |
||
| 766 | * @return \DateTimeImmutable|null |
||
| 767 | */ |
||
| 768 | public function getCreated() |
||
| 769 | { |
||
| 770 | return $this->created; |
||
| 771 | } |
||
| 772 | |||
| 773 | /** |
||
| 774 | * @param \DateTimeImmutable|null $created |
||
| 775 | * @return Product |
||
| 776 | */ |
||
| 777 | public function setCreated($created) |
||
| 778 | { |
||
| 779 | $this->created = $created; |
||
| 780 | return $this; |
||
| 781 | } |
||
| 782 | |||
| 783 | /** |
||
| 784 | * @return null|string |
||
| 785 | */ |
||
| 786 | public function getCreatedBy() |
||
| 787 | { |
||
| 788 | return $this->createdBy; |
||
| 789 | } |
||
| 790 | |||
| 791 | /** |
||
| 792 | * @param null|string $createdBy |
||
| 793 | * @return Product |
||
| 794 | */ |
||
| 795 | public function setCreatedBy($createdBy) |
||
| 796 | { |
||
| 797 | $this->createdBy = $createdBy; |
||
| 798 | return $this; |
||
| 799 | } |
||
| 800 | |||
| 801 | /** |
||
| 802 | * @return int|null |
||
| 803 | */ |
||
| 804 | public function getDefaultCategoryId() |
||
| 805 | { |
||
| 806 | return $this->defaultCategoryId; |
||
| 807 | } |
||
| 808 | |||
| 809 | /** |
||
| 810 | * @param int|null $defaultCategoryId |
||
| 811 | * @return Product |
||
| 812 | */ |
||
| 813 | public function setDefaultCategoryId($defaultCategoryId) |
||
| 814 | { |
||
| 815 | $this->defaultCategoryId = $defaultCategoryId; |
||
| 816 | return $this; |
||
| 817 | } |
||
| 818 | |||
| 819 | /** |
||
| 820 | * @return array|null |
||
| 821 | */ |
||
| 822 | public function getDisabledVariantIdList() |
||
| 823 | { |
||
| 824 | return $this->disabledVariantIdList; |
||
| 825 | } |
||
| 826 | |||
| 827 | /** |
||
| 828 | * @param array|null $disabledVariantIdList |
||
| 829 | * @return Product |
||
| 830 | */ |
||
| 831 | public function setDisabledVariantIdList($disabledVariantIdList) |
||
| 832 | { |
||
| 833 | $this->disabledVariantIdList = $disabledVariantIdList; |
||
| 834 | return $this; |
||
| 835 | } |
||
| 836 | |||
| 837 | /** |
||
| 838 | * @return null|string |
||
| 839 | */ |
||
| 840 | public function getEdbPriserProductNumber() |
||
| 841 | { |
||
| 842 | return $this->edbPriserProductNumber; |
||
| 843 | } |
||
| 844 | |||
| 845 | /** |
||
| 846 | * @param null|string $edbPriserProductNumber |
||
| 847 | * @return Product |
||
| 848 | */ |
||
| 849 | public function setEdbPriserProductNumber($edbPriserProductNumber) |
||
| 850 | { |
||
| 851 | $this->edbPriserProductNumber = $edbPriserProductNumber; |
||
| 852 | return $this; |
||
| 853 | } |
||
| 854 | |||
| 855 | /** |
||
| 856 | * @return null|string |
||
| 857 | */ |
||
| 858 | public function getFileSaleLink() |
||
| 859 | { |
||
| 860 | return $this->fileSaleLink; |
||
| 861 | } |
||
| 862 | |||
| 863 | /** |
||
| 864 | * @param null|string $fileSaleLink |
||
| 865 | * @return Product |
||
| 866 | */ |
||
| 867 | public function setFileSaleLink($fileSaleLink) |
||
| 868 | { |
||
| 869 | $this->fileSaleLink = $fileSaleLink; |
||
| 870 | return $this; |
||
| 871 | } |
||
| 872 | |||
| 873 | /** |
||
| 874 | * @return null|string |
||
| 875 | */ |
||
| 876 | public function getGoogleFeedCategory() |
||
| 877 | { |
||
| 878 | return $this->googleFeedCategory; |
||
| 879 | } |
||
| 880 | |||
| 881 | /** |
||
| 882 | * @param null|string $googleFeedCategory |
||
| 883 | * @return Product |
||
| 884 | */ |
||
| 885 | public function setGoogleFeedCategory($googleFeedCategory) |
||
| 886 | { |
||
| 887 | $this->googleFeedCategory = $googleFeedCategory; |
||
| 888 | return $this; |
||
| 889 | } |
||
| 890 | |||
| 891 | /** |
||
| 892 | * @return bool|null |
||
| 893 | */ |
||
| 894 | public function getisGiftCertificate() |
||
| 895 | { |
||
| 896 | return $this->isGiftCertificate; |
||
| 897 | } |
||
| 898 | |||
| 899 | /** |
||
| 900 | * @param bool|null $isGiftCertificate |
||
| 901 | * @return Product |
||
| 902 | */ |
||
| 903 | public function setIsGiftCertificate($isGiftCertificate) |
||
| 904 | { |
||
| 905 | $this->isGiftCertificate = $isGiftCertificate; |
||
| 906 | return $this; |
||
| 907 | } |
||
| 908 | |||
| 909 | /** |
||
| 910 | * @return bool|null |
||
| 911 | */ |
||
| 912 | public function getisModified() |
||
| 913 | { |
||
| 914 | return $this->isModified; |
||
| 915 | } |
||
| 916 | |||
| 917 | /** |
||
| 918 | * @param bool|null $isModified |
||
| 919 | * @return Product |
||
| 920 | */ |
||
| 921 | public function setIsModified($isModified) |
||
| 922 | { |
||
| 923 | $this->isModified = $isModified; |
||
| 924 | return $this; |
||
| 925 | } |
||
| 926 | |||
| 927 | /** |
||
| 928 | * @return bool|null |
||
| 929 | */ |
||
| 930 | public function getisRateVariants() |
||
| 931 | { |
||
| 932 | return $this->isRateVariants; |
||
| 933 | } |
||
| 934 | |||
| 935 | /** |
||
| 936 | * @param bool|null $isRateVariants |
||
| 937 | * @return Product |
||
| 938 | */ |
||
| 939 | public function setIsRateVariants($isRateVariants) |
||
| 940 | { |
||
| 941 | $this->isRateVariants = $isRateVariants; |
||
| 942 | return $this; |
||
| 943 | } |
||
| 944 | |||
| 945 | /** |
||
| 946 | * @return bool|null |
||
| 947 | */ |
||
| 948 | public function getisReviewVariants() |
||
| 949 | { |
||
| 950 | return $this->isReviewVariants; |
||
| 951 | } |
||
| 952 | |||
| 953 | /** |
||
| 954 | * @param bool|null $isReviewVariants |
||
| 955 | * @return Product |
||
| 956 | */ |
||
| 957 | public function setIsReviewVariants($isReviewVariants) |
||
| 958 | { |
||
| 959 | $this->isReviewVariants = $isReviewVariants; |
||
| 960 | return $this; |
||
| 961 | } |
||
| 962 | |||
| 963 | /** |
||
| 964 | * @return bool|null |
||
| 965 | */ |
||
| 966 | public function getisVariantMaster() |
||
| 967 | { |
||
| 968 | return $this->isVariantMaster; |
||
| 969 | } |
||
| 970 | |||
| 971 | /** |
||
| 972 | * @param bool|null $isVariantMaster |
||
| 973 | * @return Product |
||
| 974 | */ |
||
| 975 | public function setIsVariantMaster($isVariantMaster) |
||
| 976 | { |
||
| 977 | $this->isVariantMaster = $isVariantMaster; |
||
| 978 | return $this; |
||
| 979 | } |
||
| 980 | |||
| 981 | /** |
||
| 982 | * @return null|string |
||
| 983 | */ |
||
| 984 | public function getLocationNumber() |
||
| 985 | { |
||
| 986 | return $this->locationNumber; |
||
| 987 | } |
||
| 988 | |||
| 989 | /** |
||
| 990 | * @param null|string $locationNumber |
||
| 991 | * @return Product |
||
| 992 | */ |
||
| 993 | public function setLocationNumber($locationNumber) |
||
| 994 | { |
||
| 995 | $this->locationNumber = $locationNumber; |
||
| 996 | return $this; |
||
| 997 | } |
||
| 998 | |||
| 999 | /** |
||
| 1000 | * @return array|null |
||
| 1001 | */ |
||
| 1002 | public function getManufacturereIdList() |
||
| 1003 | { |
||
| 1004 | return $this->manufacturereIdList; |
||
| 1005 | } |
||
| 1006 | |||
| 1007 | /** |
||
| 1008 | * @param array|null $manufacturereIdList |
||
| 1009 | * @return Product |
||
| 1010 | */ |
||
| 1011 | public function setManufacturereIdList($manufacturereIdList) |
||
| 1012 | { |
||
| 1013 | $this->manufacturereIdList = $manufacturereIdList; |
||
| 1014 | return $this; |
||
| 1015 | } |
||
| 1016 | |||
| 1017 | /** |
||
| 1018 | * @return int|null |
||
| 1019 | */ |
||
| 1020 | public function getMaxBuyAmount() |
||
| 1021 | { |
||
| 1022 | return $this->maxBuyAmount; |
||
| 1023 | } |
||
| 1024 | |||
| 1025 | /** |
||
| 1026 | * @param int|null $maxBuyAmount |
||
| 1027 | * @return Product |
||
| 1028 | */ |
||
| 1029 | public function setMaxBuyAmount($maxBuyAmount) |
||
| 1033 | } |
||
| 1034 | |||
| 1035 | /** |
||
| 1036 | * @return int|null |
||
| 1037 | */ |
||
| 1038 | public function getMinBuyAmount() |
||
| 1039 | { |
||
| 1040 | return $this->minBuyAmount; |
||
| 1041 | } |
||
| 1042 | |||
| 1043 | /** |
||
| 1044 | * @param int|null $minBuyAmount |
||
| 1045 | * @return Product |
||
| 1046 | */ |
||
| 1047 | public function setMinBuyAmount($minBuyAmount) |
||
| 1048 | { |
||
| 1049 | $this->minBuyAmount = $minBuyAmount; |
||
| 1050 | return $this; |
||
| 1051 | } |
||
| 1052 | |||
| 1053 | /** |
||
| 1054 | * @return int|null |
||
| 1055 | */ |
||
| 1056 | public function getMinBuyAmountB2B() |
||
| 1057 | { |
||
| 1058 | return $this->minBuyAmountB2B; |
||
| 1059 | } |
||
| 1060 | |||
| 1061 | /** |
||
| 1062 | * @param int|null $minBuyAmountB2B |
||
| 1063 | * @return Product |
||
| 1064 | */ |
||
| 1065 | public function setMinBuyAmountB2B($minBuyAmountB2B) |
||
| 1066 | { |
||
| 1067 | $this->minBuyAmountB2B = $minBuyAmountB2B; |
||
| 1068 | return $this; |
||
| 1069 | } |
||
| 1070 | |||
| 1071 | /** |
||
| 1072 | * @return null|string |
||
| 1073 | */ |
||
| 1074 | public function getNumber() |
||
| 1075 | { |
||
| 1076 | return $this->number; |
||
| 1077 | } |
||
| 1078 | |||
| 1079 | /** |
||
| 1080 | * @param null|string $number |
||
| 1081 | * @return Product |
||
| 1082 | */ |
||
| 1083 | public function setNumber($number) |
||
| 1084 | { |
||
| 1085 | $this->number = $number; |
||
| 1086 | return $this; |
||
| 1087 | } |
||
| 1088 | |||
| 1089 | /** |
||
| 1090 | * @return null|string |
||
| 1091 | */ |
||
| 1092 | public function getPicture() |
||
| 1093 | { |
||
| 1094 | return $this->picture; |
||
| 1095 | } |
||
| 1096 | |||
| 1097 | /** |
||
| 1098 | * @param null|string $picture |
||
| 1099 | * @return Product |
||
| 1100 | */ |
||
| 1101 | public function setPicture($picture) |
||
| 1102 | { |
||
| 1103 | $this->picture = $picture; |
||
| 1104 | return $this; |
||
| 1105 | } |
||
| 1106 | |||
| 1107 | /** |
||
| 1108 | * @return int|null |
||
| 1109 | */ |
||
| 1110 | public function getSalesCount() |
||
| 1111 | { |
||
| 1112 | return $this->salesCount; |
||
| 1113 | } |
||
| 1114 | |||
| 1115 | /** |
||
| 1116 | * @param int|null $salesCount |
||
| 1117 | * @return Product |
||
| 1118 | */ |
||
| 1119 | public function setSalesCount($salesCount) |
||
| 1120 | { |
||
| 1121 | $this->salesCount = $salesCount; |
||
| 1122 | return $this; |
||
| 1123 | } |
||
| 1124 | |||
| 1125 | /** |
||
| 1126 | * @return array|null |
||
| 1127 | */ |
||
| 1128 | public function getSegmentIdList() |
||
| 1129 | { |
||
| 1130 | return $this->segmentIdList; |
||
| 1131 | } |
||
| 1132 | |||
| 1133 | /** |
||
| 1134 | * @param array|null $segmentIdList |
||
| 1135 | * @return Product |
||
| 1136 | */ |
||
| 1137 | public function setSegmentIdList($segmentIdList) |
||
| 1138 | { |
||
| 1139 | $this->segmentIdList = $segmentIdList; |
||
| 1140 | return $this; |
||
| 1141 | } |
||
| 1142 | |||
| 1143 | /** |
||
| 1144 | * @return int|null |
||
| 1145 | */ |
||
| 1146 | public function getSortOrder() |
||
| 1147 | { |
||
| 1148 | return $this->sortOrder; |
||
| 1149 | } |
||
| 1150 | |||
| 1151 | /** |
||
| 1152 | * @param int|null $sortOrder |
||
| 1153 | * @return Product |
||
| 1154 | */ |
||
| 1155 | public function setSortOrder($sortOrder) |
||
| 1156 | { |
||
| 1157 | $this->sortOrder = $sortOrder; |
||
| 1158 | return $this; |
||
| 1159 | } |
||
| 1160 | |||
| 1161 | /** |
||
| 1162 | * @return int|null |
||
| 1163 | */ |
||
| 1164 | public function getStockCount() |
||
| 1165 | { |
||
| 1166 | return $this->stockCount; |
||
| 1167 | } |
||
| 1168 | |||
| 1169 | /** |
||
| 1170 | * @param int|null $stockCount |
||
| 1171 | * @return Product |
||
| 1172 | */ |
||
| 1173 | public function setStockCount($stockCount) |
||
| 1174 | { |
||
| 1175 | $this->stockCount = $stockCount; |
||
| 1176 | return $this; |
||
| 1177 | } |
||
| 1178 | |||
| 1179 | /** |
||
| 1180 | * @return int|null |
||
| 1181 | */ |
||
| 1182 | public function getStockLimit() |
||
| 1183 | { |
||
| 1184 | return $this->stockLimit; |
||
| 1185 | } |
||
| 1186 | |||
| 1187 | /** |
||
| 1188 | * @param int|null $stockLimit |
||
| 1189 | * @return Product |
||
| 1190 | */ |
||
| 1191 | public function setStockLimit($stockLimit) |
||
| 1192 | { |
||
| 1193 | $this->stockLimit = $stockLimit; |
||
| 1194 | return $this; |
||
| 1195 | } |
||
| 1196 | |||
| 1197 | /** |
||
| 1198 | * @return int|null |
||
| 1199 | */ |
||
| 1200 | public function getTypeId() |
||
| 1201 | { |
||
| 1202 | return $this->typeId; |
||
| 1203 | } |
||
| 1204 | |||
| 1205 | /** |
||
| 1206 | * @param int|null $typeId |
||
| 1207 | * @return Product |
||
| 1208 | */ |
||
| 1209 | public function setTypeId($typeId) |
||
| 1210 | { |
||
| 1211 | $this->typeId = $typeId; |
||
| 1212 | return $this; |
||
| 1213 | } |
||
| 1214 | |||
| 1215 | /** |
||
| 1216 | * @return \DateTimeImmutable|null |
||
| 1217 | */ |
||
| 1218 | public function getUpdated() |
||
| 1219 | { |
||
| 1220 | return $this->updated; |
||
| 1221 | } |
||
| 1222 | |||
| 1223 | /** |
||
| 1224 | * @param \DateTimeImmutable|null $updated |
||
| 1225 | * @return Product |
||
| 1226 | */ |
||
| 1227 | public function setUpdated($updated) |
||
| 1228 | { |
||
| 1229 | $this->updated = $updated; |
||
| 1230 | return $this; |
||
| 1231 | } |
||
| 1232 | |||
| 1233 | /** |
||
| 1234 | * @return null|string |
||
| 1235 | */ |
||
| 1236 | public function getUpdatedBy() |
||
| 1237 | { |
||
| 1238 | return $this->updatedBy; |
||
| 1239 | } |
||
| 1240 | |||
| 1241 | /** |
||
| 1242 | * @param null|string $updatedBy |
||
| 1243 | * @return Product |
||
| 1244 | */ |
||
| 1245 | public function setUpdatedBy($updatedBy) |
||
| 1246 | { |
||
| 1247 | $this->updatedBy = $updatedBy; |
||
| 1248 | return $this; |
||
| 1249 | } |
||
| 1250 | |||
| 1251 | /** |
||
| 1252 | * @return array|null |
||
| 1253 | */ |
||
| 1254 | public function getVariantGroupIdList() |
||
| 1255 | { |
||
| 1256 | return $this->variantGroupIdList; |
||
| 1257 | } |
||
| 1258 | |||
| 1259 | /** |
||
| 1260 | * @param array|null $variantGroupIdList |
||
| 1261 | * @return Product |
||
| 1262 | */ |
||
| 1263 | public function setVariantGroupIdList($variantGroupIdList) |
||
| 1264 | { |
||
| 1265 | $this->variantGroupIdList = $variantGroupIdList; |
||
| 1266 | return $this; |
||
| 1267 | } |
||
| 1268 | |||
| 1269 | /** |
||
| 1270 | * @return array|null |
||
| 1271 | */ |
||
| 1272 | public function getVariantIdList() |
||
| 1273 | { |
||
| 1274 | return $this->variantIdList; |
||
| 1275 | } |
||
| 1276 | |||
| 1277 | /** |
||
| 1278 | * @param array|null $variantIdList |
||
| 1279 | * @return Product |
||
| 1280 | */ |
||
| 1281 | public function setVariantIdList($variantIdList) |
||
| 1282 | { |
||
| 1283 | $this->variantIdList = $variantIdList; |
||
| 1284 | return $this; |
||
| 1285 | } |
||
| 1286 | |||
| 1287 | /** |
||
| 1288 | * @return int|null |
||
| 1289 | */ |
||
| 1290 | public function getVariantMasterId() |
||
| 1291 | { |
||
| 1292 | return $this->variantMasterId; |
||
| 1293 | } |
||
| 1294 | |||
| 1295 | /** |
||
| 1296 | * @param int|null $variantMasterId |
||
| 1297 | * @return Product |
||
| 1298 | */ |
||
| 1299 | public function setVariantMasterId($variantMasterId) |
||
| 1300 | { |
||
| 1301 | $this->variantMasterId = $variantMasterId; |
||
| 1302 | return $this; |
||
| 1303 | } |
||
| 1304 | |||
| 1305 | /** |
||
| 1306 | * @return null|string |
||
| 1307 | */ |
||
| 1308 | public function getVendorNumber() |
||
| 1309 | { |
||
| 1310 | return $this->vendorNumber; |
||
| 1311 | } |
||
| 1312 | |||
| 1313 | /** |
||
| 1314 | * @param null|string $vendorNumber |
||
| 1315 | * @return Product |
||
| 1316 | */ |
||
| 1317 | public function setVendorNumber($vendorNumber) |
||
| 1318 | { |
||
| 1319 | $this->vendorNumber = $vendorNumber; |
||
| 1320 | return $this; |
||
| 1321 | } |
||
| 1322 | |||
| 1323 | /** |
||
| 1324 | * @return int|null |
||
| 1325 | */ |
||
| 1326 | public function getWeight() |
||
| 1327 | { |
||
| 1328 | return $this->weight; |
||
| 1329 | } |
||
| 1330 | |||
| 1331 | /** |
||
| 1332 | * @param int|null $weight |
||
| 1333 | * @return Product |
||
| 1334 | */ |
||
| 1335 | public function setWeight($weight) |
||
| 1336 | { |
||
| 1337 | $this->weight = $weight; |
||
| 1338 | return $this; |
||
| 1339 | } |
||
| 1340 | |||
| 1341 | /** |
||
| 1342 | * @return ArrayCollection|Category[] |
||
| 1343 | */ |
||
| 1344 | public function getCategories() |
||
| 1345 | { |
||
| 1346 | return $this->categories; |
||
| 1347 | } |
||
| 1348 | |||
| 1349 | /** |
||
| 1350 | * @param ArrayCollection|Category[] $categories |
||
| 1351 | * @return Product |
||
| 1352 | */ |
||
| 1353 | public function setCategories($categories) |
||
| 1354 | { |
||
| 1355 | $this->categories = $categories; |
||
| 1356 | return $this; |
||
| 1357 | } |
||
| 1358 | |||
| 1359 | /** |
||
| 1360 | * @return ArrayCollection|Variant[] |
||
| 1361 | */ |
||
| 1362 | public function getDisabledVariants() |
||
| 1363 | { |
||
| 1364 | return $this->disabledVariants; |
||
| 1365 | } |
||
| 1366 | |||
| 1367 | /** |
||
| 1368 | * @param ArrayCollection|Variant[] $disabledVariants |
||
| 1369 | * @return Product |
||
| 1370 | */ |
||
| 1371 | public function setDisabledVariants($disabledVariants) |
||
| 1372 | { |
||
| 1373 | $this->disabledVariants = $disabledVariants; |
||
| 1374 | return $this; |
||
| 1375 | } |
||
| 1376 | |||
| 1377 | /** |
||
| 1378 | * @return ArrayCollection|Manufacturer[] |
||
| 1379 | */ |
||
| 1380 | public function getManufacturers() |
||
| 1381 | { |
||
| 1382 | return $this->manufacturers; |
||
| 1383 | } |
||
| 1384 | |||
| 1385 | /** |
||
| 1386 | * @param ArrayCollection|Manufacturer[] $manufacturers |
||
| 1387 | * @return Product |
||
| 1388 | */ |
||
| 1389 | public function setManufacturers($manufacturers) |
||
| 1393 | } |
||
| 1394 | |||
| 1395 | /** |
||
| 1396 | * @return ArrayCollection|Medium[] |
||
| 1397 | */ |
||
| 1398 | public function getMedia() |
||
| 1401 | } |
||
| 1402 | |||
| 1403 | /** |
||
| 1404 | * @param ArrayCollection|Medium[] $media |
||
| 1405 | * @return Product |
||
| 1406 | */ |
||
| 1407 | public function setMedia($media) |
||
| 1408 | { |
||
| 1409 | $this->media = $media; |
||
| 1410 | return $this; |
||
| 1411 | } |
||
| 1412 | |||
| 1413 | /** |
||
| 1414 | * @return ArrayCollection|Price[] |
||
| 1415 | */ |
||
| 1416 | public function getPrices() |
||
| 1417 | { |
||
| 1418 | return $this->prices; |
||
| 1419 | } |
||
| 1420 | |||
| 1421 | /** |
||
| 1422 | * @param ArrayCollection|Price[] $prices |
||
| 1423 | * @return Product |
||
| 1424 | */ |
||
| 1425 | public function setPrices($prices) |
||
| 1429 | } |
||
| 1430 | |||
| 1431 | /** |
||
| 1432 | * @return ArrayCollection|ProductRelation[] |
||
| 1433 | */ |
||
| 1434 | public function getProductRelations() |
||
| 1435 | { |
||
| 1436 | return $this->productRelations; |
||
| 1437 | } |
||
| 1438 | |||
| 1439 | /** |
||
| 1440 | * @param ArrayCollection|ProductRelation[] $productRelations |
||
| 1441 | * @return Product |
||
| 1442 | */ |
||
| 1443 | public function setProductRelations($productRelations) |
||
| 1444 | { |
||
| 1445 | $this->productRelations = $productRelations; |
||
| 1446 | return $this; |
||
| 1447 | } |
||
| 1448 | |||
| 1449 | /** |
||
| 1450 | * @return ProductType |
||
| 1451 | */ |
||
| 1452 | public function getProductType(): ProductType |
||
| 1453 | { |
||
| 1454 | return $this->productType; |
||
| 1455 | } |
||
| 1456 | |||
| 1457 | /** |
||
| 1458 | * @param ProductType $productType |
||
| 1459 | * @return Product |
||
| 1460 | */ |
||
| 1461 | public function setProductType(ProductType $productType) |
||
| 1462 | { |
||
| 1463 | $this->productType = $productType; |
||
| 1464 | return $this; |
||
| 1465 | } |
||
| 1466 | |||
| 1467 | /** |
||
| 1468 | * @return ArrayCollection|Segment[] |
||
| 1469 | */ |
||
| 1470 | public function getSegments() |
||
| 1471 | { |
||
| 1472 | return $this->segments; |
||
| 1473 | } |
||
| 1474 | |||
| 1475 | /** |
||
| 1476 | * @param ArrayCollection|Segment[] $segments |
||
| 1477 | * @return Product |
||
| 1478 | */ |
||
| 1479 | public function setSegments($segments) |
||
| 1480 | { |
||
| 1481 | $this->segments = $segments; |
||
| 1482 | return $this; |
||
| 1483 | } |
||
| 1484 | |||
| 1485 | /** |
||
| 1486 | * @return ArrayCollection|VariantGroup[] |
||
| 1487 | */ |
||
| 1488 | public function getVariantGroups() |
||
| 1489 | { |
||
| 1490 | return $this->variantGroups; |
||
| 1491 | } |
||
| 1492 | |||
| 1493 | /** |
||
| 1494 | * @param ArrayCollection|VariantGroup[] $variantGroups |
||
| 1495 | * @return Product |
||
| 1496 | */ |
||
| 1497 | public function setVariantGroups($variantGroups) |
||
| 1498 | { |
||
| 1499 | $this->variantGroups = $variantGroups; |
||
| 1500 | return $this; |
||
| 1501 | } |
||
| 1502 | |||
| 1503 | /** |
||
| 1504 | * @return ArrayCollection|Variant[] |
||
| 1505 | */ |
||
| 1506 | public function getVariants() |
||
| 1509 | } |
||
| 1510 | |||
| 1511 | /** |
||
| 1512 | * @param ArrayCollection|Variant[] $variants |
||
| 1513 | * @return Product |
||
| 1514 | */ |
||
| 1515 | public function setVariants($variants) |
||
| 1516 | { |
||
| 1517 | $this->variants = $variants; |
||
| 1518 | return $this; |
||
| 1519 | } |
||
| 1520 | } |
||
| 1521 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.