src/Entity/Prod.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping\Index;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\ProdRepository;
  7. use App\Entity\Translation\ProdTranslation;
  8. use App\Env;
  9. use Gedmo\Mapping\Annotation\TranslationEntity;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
  12. use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
  13. #[ORM\Entity(repositoryClassProdRepository::class)]
  14. #[TranslationEntity(class: ProdTranslation::class)]
  15. #[Index(name"prod_cat"columns: ["cat"])]
  16. #[Index(name"prod_art"columns: ["art"])]
  17. #[Index(name"prod_prior"columns: ["prior"])]
  18. #[Index(name"prod_pop"columns: ["pop""visible"])]
  19. #[Index(name"prod_action"columns: ["action""visible"])]
  20. #[Index(name"prod_mix"columns: ["mix""visible"])]
  21. #[Index(name"prod_new"columns: ["new""visible"])]
  22. #[Index(name"prod_sale"columns: ["sale""visible"])]
  23. #[Index(name"prod_tags"columns: ["tags"])]
  24. class Prod implements EntityInterface
  25. {
  26.     #[ORM\Id]
  27.     #[ORM\GeneratedValue]
  28.     #[ORM\Column]
  29.     private ?int $id null;
  30.     #[ORM\Column(type'integer')]
  31.     private int $cat 0;
  32.     #[ORM\Column(length255)]
  33.     private ?string $intname null;
  34.     #[GedmoTranslatable]
  35.     #[ORM\Column(length255)]
  36.     private ?string $name null;
  37.     #[ORM\Column(length255)]
  38.     private ?string $art null;
  39.     #[GedmoTranslatable]
  40.     #[ORM\Column(typeTypes::TEXT)]
  41.     private ?string $short null;
  42.     #[GedmoTranslatable]
  43.     #[ORM\Column(typeTypes::TEXT)]
  44.     private ?string $cont null;
  45.     #[ORM\Column]
  46.     private ?float $price null;
  47.     #[ORM\Column]
  48.     private ?float $price2 null;
  49.     #[ORM\Column]
  50.     private ?float $price3 null;
  51.     #[ORM\Column]
  52.     private ?float $price4 null;
  53.     #[ORM\Column]
  54.     private ?float $priceopt null;
  55.     #[ORM\Column]
  56.     private ?float $priceopt2 null;
  57.     #[ORM\Column]
  58.     private ?float $priceopt3 null;
  59.     #[ORM\Column]
  60.     private ?float $priceopt4 null;
  61.     #[ORM\Column]
  62.     private ?float $skidka null;
  63.     #[ORM\Column]
  64.     private ?float $skidka2 null;
  65.     #[ORM\Column]
  66.     private ?float $skidka3 null;
  67.     #[ORM\Column]
  68.     private ?float $skidka4 null;
  69.     #[ORM\Column]
  70.     private ?float $skidkaopt null;
  71.     #[ORM\Column]
  72.     private ?float $skidkaopt2 null;
  73.     #[ORM\Column]
  74.     private ?float $skidkaopt3 null;
  75.     #[ORM\Column]
  76.     private ?float $skidkaopt4 null;
  77.     #[ORM\Column]
  78.     private array $numdiscount = [];
  79.     #[ORM\Column]
  80.     private array $numdiscount2 = [];
  81.     #[ORM\Column]
  82.     private array $numdiscount3 = [];
  83.     #[ORM\Column]
  84.     private array $numdiscount4 = [];
  85.     #[ORM\Column]
  86.     private array $numdiscountopt = [];
  87.     #[ORM\Column]
  88.     private array $numdiscountopt2 = [];
  89.     #[ORM\Column]
  90.     private array $numdiscountopt3 = [];
  91.     #[ORM\Column]
  92.     private array $numdiscountopt4 = [];
  93.     #[ORM\Column]
  94.     private ?int $num null;
  95.     #[ORM\Column]
  96.     private ?int $num2 null;
  97.     #[ORM\Column]
  98.     private ?int $num3 null;
  99.     #[ORM\Column]
  100.     private ?int $num4 null;
  101.     #[ORM\Column(length255)]
  102.     #[GedmoTranslatable]
  103.     private ?string $inpack null;
  104.     #[ORM\Column(length255)]
  105.     #[GedmoTranslatable]
  106.     private ?string $inpack2 null;
  107.     #[ORM\Column(length255)]
  108.     #[GedmoTranslatable]
  109.     private ?string $inpack3 null;
  110.     #[ORM\Column(length255)]
  111.     #[GedmoTranslatable]
  112.     private ?string $inpack4 null;
  113.     #[ORM\Column]
  114.     private ?int $weight null;
  115.     #[ORM\Column]
  116.     private ?int $weight2 null;
  117.     #[ORM\Column]
  118.     private ?int $weight3 null;
  119.     #[ORM\Column]
  120.     private ?int $weight4 null;
  121.     #[ORM\Column]
  122.     private ?bool $visible null;
  123.     #[ORM\Column]
  124.     private ?bool $pop null;
  125.     #[ORM\Column]
  126.     private ?bool $action null;
  127.     #[ORM\Column]
  128.     private ?bool $mix null;
  129.     #[ORM\Column]
  130.     private ?bool $main null;
  131.     #[ORM\Column]
  132.     private ?bool $new null;
  133.     #[ORM\Column]
  134.     private ?bool $sale null;
  135.     #[ORM\Column]
  136.     private ?bool $onsale null;
  137.     #[ORM\Column]
  138.     private ?int $prior null;
  139.     #[GedmoTranslatable]
  140.     #[ORM\Column(length1000)]
  141.     private ?string $title null;
  142.     #[GedmoTranslatable]
  143.     #[ORM\Column(length1000)]
  144.     private ?string $descr null;
  145.     #[GedmoTranslatable]
  146.     #[ORM\Column(length1000)]
  147.     private ?string $kw null;
  148.     #[GedmoTranslatable]
  149.     #[ORM\Column(length1000)]
  150.     private ?string $h1 null;
  151.     #[ORM\Column]
  152.     private ?int $rating null;
  153.     #[ORM\Column(length255)]
  154.     private ?string $spec null;
  155.     #[ORM\Column]
  156.     private ?int $ordered null;
  157.     #[ORM\Column(length255)]
  158.     private ?string $izm null;
  159.     #[ORM\Column(length255)]
  160.     private ?string $pic null;
  161.     #[ORM\Column]
  162.     private ?int $views null;
  163.     #[ORM\Column]
  164.     private ?bool $justuploaded null;
  165.     #[ORM\Column]
  166.     private ?int $uploaded null;
  167.     #[ORM\Column]
  168.     private ?int $changed null;
  169.     #[ORM\Column]
  170.     private array $colors = [];
  171.     #[ORM\Column(length255)]
  172.     private ?string $sku null;
  173.     #[ORM\Column(length255)]
  174.     private ?string $model null;
  175.     #[ORM\Column(length1000)]
  176.     private ?string $chars null;
  177.     #[ORM\Column(length1000)]
  178.     private ?string $tags null;
  179.     public $prices = [];
  180.     public $photos = [];
  181.     public $childs = [];
  182.     #[GedmoLocale]
  183.     private $locale;
  184.     #[ORM\OneToMany(targetEntityProdTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  185.     private $translations;
  186.     #[ORM\Column(length255nullabletrue)]
  187.     private ?string $externalId null;
  188.     public function __construct()
  189.     {
  190.         $this->translations = new ArrayCollection();
  191.     }
  192.     public function setLocale($locale)
  193.     {
  194.         $this->locale $locale;
  195.     }
  196.     public function getTranslations()
  197.     {
  198.         return $this->translations;
  199.     }
  200.     public function addTranslation(ProdTranslation $t)
  201.     {
  202.         if (!$this->translations->contains($t)) {
  203.             $this->translations[] = $t;
  204.             $t->setObject($this);
  205.         }
  206.     }
  207.     
  208.     public function getId(): ?int
  209.     {
  210.         return $this->id;
  211.     }
  212.     public function getCat(): int
  213.     {
  214.         return $this->cat;
  215.     }
  216.     public function setCat(int $cat): self
  217.     {
  218.         $this->cat $cat;
  219.         return $this;
  220.     }
  221.     public function getIntname(): ?string
  222.     {
  223.         return $this->intname;
  224.     }
  225.     public function setIntname(string $intname): self
  226.     {
  227.         $this->intname $intname;
  228.         return $this;
  229.     }
  230.     public function getName(): ?string
  231.     {
  232.         return $this->name;
  233.     }
  234.     public function setName(string $name): self
  235.     {
  236.         $this->name $name;
  237.         return $this;
  238.     }
  239.     public function getArt(): ?string
  240.     {
  241.         return $this->art;
  242.     }
  243.     public function setArt(string $art): self
  244.     {
  245.         $this->art $art;
  246.         return $this;
  247.     }
  248.     public function getShort(): ?string
  249.     {
  250.         return $this->short;
  251.     }
  252.     public function setShort(string $short): self
  253.     {
  254.         $this->short $short;
  255.         return $this;
  256.     }
  257.     public function getCont(): ?string
  258.     {
  259.         return str_replace(["|"], ["<br>"], $this->cont);
  260.     }
  261.     public function setCont(string $cont): self
  262.     {
  263.         $this->cont $cont;
  264.         return $this;
  265.     }
  266.     public function setPrices(array $prices)
  267.     {
  268.         $this->prices $prices;
  269.     }
  270.     public function getPrices(): array
  271.     {
  272.         return $this->prices;
  273.     }
  274.     public function getPrice(): ?float
  275.     {
  276.         return Env::is_opt() ? $this->priceopt $this->price;
  277.     }
  278.     public function setPrice(float $price): self
  279.     {
  280.         $this->price $price;
  281.         return $this;
  282.     }
  283.     public function getPrice2(): ?float
  284.     {
  285.         return Env::is_opt() ? $this->priceopt2 $this->price2;
  286.     }
  287.     public function setPrice2(float $price2): self
  288.     {
  289.         $this->price2 $price2;
  290.         return $this;
  291.     }
  292.     public function getPrice3(): ?float
  293.     {
  294.         return Env::is_opt() ? $this->priceopt3 $this->price3;
  295.     }
  296.     public function setPrice3(float $price3): self
  297.     {
  298.         $this->price3 $price3;
  299.         return $this;
  300.     }
  301.     public function getPrice4(): ?float
  302.     {
  303.         return Env::is_opt() ? $this->priceopt4 $this->price4;
  304.     }
  305.     public function setPrice4(float $price4): self
  306.     {
  307.         $this->price4 $price4;
  308.         return $this;
  309.     }
  310.     public function getPriceopt(): ?float
  311.     {
  312.         return $this->priceopt;
  313.     }
  314.     public function setPriceopt(float $priceopt): self
  315.     {
  316.         $this->priceopt $priceopt;
  317.         return $this;
  318.     }
  319.     public function getPriceopt2(): ?float
  320.     {
  321.         return $this->priceopt2;
  322.     }
  323.     public function setPriceopt2(float $priceopt2): self
  324.     {
  325.         $this->priceopt2 $priceopt2;
  326.         return $this;
  327.     }
  328.     public function getPriceopt3(): ?float
  329.     {
  330.         return $this->priceopt3;
  331.     }
  332.     public function setPriceopt3(float $priceopt3): self
  333.     {
  334.         $this->priceopt3 $priceopt3;
  335.         return $this;
  336.     }
  337.     public function getPriceopt4(): ?float
  338.     {
  339.         return $this->priceopt4;
  340.     }
  341.     public function setPriceopt4(float $priceopt4): self
  342.     {
  343.         $this->priceopt4 $priceopt4;
  344.         return $this;
  345.     }
  346.     public function getSkidka(): ?float
  347.     {
  348.         return Env::is_opt() ? $this->skidkaopt $this->skidka;
  349.     }
  350.     public function setSkidka(float $skidka): self
  351.     {
  352.         $this->skidka $skidka;
  353.         return $this;
  354.     }
  355.     public function getSkidka2(): ?float
  356.     {
  357.         return Env::is_opt() ? $this->skidkaopt2 $this->skidka2;
  358.     }
  359.     public function setSkidka2(float $skidka2): self
  360.     {
  361.         $this->skidka2 $skidka2;
  362.         return $this;
  363.     }
  364.     public function getSkidka3(): ?float
  365.     {
  366.         return Env::is_opt() ? $this->skidkaopt3 $this->skidka3;
  367.     }
  368.     public function setSkidka3(float $skidka3): self
  369.     {
  370.         $this->skidka3 $skidka3;
  371.         return $this;
  372.     }
  373.     public function getSkidka4(): ?float
  374.     {
  375.         return Env::is_opt() ? $this->skidkaopt4 $this->skidka4;
  376.     }
  377.     public function setSkidka4(float $skidka4): self
  378.     {
  379.         $this->skidka4 $skidka4;
  380.         return $this;
  381.     }
  382.     public function getSkidkaopt(): ?float
  383.     {
  384.         return $this->skidkaopt;
  385.     }
  386.     public function setSkidkaopt(float $skidkaopt): self
  387.     {
  388.         $this->skidkaopt $skidkaopt;
  389.         return $this;
  390.     }
  391.     public function getSkidkaopt2(): ?float
  392.     {
  393.         return $this->skidkaopt2;
  394.     }
  395.     public function setSkidkaopt2(float $skidkaopt2): self
  396.     {
  397.         $this->skidkaopt2 $skidkaopt2;
  398.         return $this;
  399.     }
  400.     public function getSkidkaopt3(): ?float
  401.     {
  402.         return $this->skidkaopt3;
  403.     }
  404.     public function setSkidkaopt3(float $skidkaopt3): self
  405.     {
  406.         $this->skidkaopt3 $skidkaopt3;
  407.         return $this;
  408.     }
  409.     public function getSkidkaopt4(): ?float
  410.     {
  411.         return $this->skidkaopt4;
  412.     }
  413.     public function setSkidkaopt4(float $skidkaopt4): self
  414.     {
  415.         $this->skidkaopt4 $skidkaopt4;
  416.         return $this;
  417.     }
  418.     public function getNumdiscount(): array
  419.     {
  420.         return Env::is_opt() ? $this->numdiscountopt $this->numdiscount;
  421.     }
  422.     public function setNumdiscount(array $numdiscount): self
  423.     {
  424.         $this->numdiscount $numdiscount;
  425.         return $this;
  426.     }
  427.     public function getNumdiscount2(): array
  428.     {
  429.         return Env::is_opt() ? $this->numdiscountopt2 $this->numdiscount2;
  430.     }
  431.     public function setNumdiscount2(array $numdiscount2): self
  432.     {
  433.         $this->numdiscount2 $numdiscount2;
  434.         return $this;
  435.     }
  436.     public function getNumdiscount3(): array
  437.     {
  438.         return Env::is_opt() ? $this->numdiscountopt3 $this->numdiscount3;
  439.     }
  440.     public function setNumdiscount3(array $numdiscount3): self
  441.     {
  442.         $this->numdiscount3 $numdiscount3;
  443.         return $this;
  444.     }
  445.     public function getNumdiscount4(): array
  446.     {
  447.         return Env::is_opt() ? $this->numdiscountopt4 $this->numdiscount4;
  448.     }
  449.     public function setNumdiscount4(array $numdiscount4): self
  450.     {
  451.         $this->numdiscount4 $numdiscount4;
  452.         return $this;
  453.     }
  454.     public function getNumdiscountopt(): array
  455.     {
  456.         return $this->numdiscountopt;
  457.     }
  458.     public function setNumdiscountopt(array $numdiscountopt): self
  459.     {
  460.         $this->numdiscountopt $numdiscountopt;
  461.         return $this;
  462.     }
  463.     public function getNumdiscountopt2(): array
  464.     {
  465.         return $this->numdiscountopt2;
  466.     }
  467.     public function setNumdiscountopt2(array $numdiscountopt2): self
  468.     {
  469.         $this->numdiscountopt2 $numdiscountopt2;
  470.         return $this;
  471.     }
  472.     public function getNumdiscountopt3(): array
  473.     {
  474.         return $this->numdiscountopt3;
  475.     }
  476.     public function setNumdiscountopt3(array $numdiscountopt3): self
  477.     {
  478.         $this->numdiscountopt3 $numdiscountopt3;
  479.         return $this;
  480.     }
  481.     public function getNumdiscountopt4(): array
  482.     {
  483.         return $this->numdiscountopt4;
  484.     }
  485.     public function setNumdiscountopt4(array $numdiscountopt4): self
  486.     {
  487.         $this->numdiscountopt4 $numdiscountopt4;
  488.         return $this;
  489.     }
  490.     public function getNum(): ?int
  491.     {
  492.         return $this->num;
  493.     }
  494.     public function setNum(int $num): self
  495.     {
  496.         $this->num $num;
  497.         return $this;
  498.     }
  499.     public function getNum2(): ?int
  500.     {
  501.         return $this->num2;
  502.     }
  503.     public function setNum2(int $num2): self
  504.     {
  505.         $this->num2 $num2;
  506.         return $this;
  507.     }
  508.     public function getNum3(): ?int
  509.     {
  510.         return $this->num3;
  511.     }
  512.     public function setNum3(int $num3): self
  513.     {
  514.         $this->num3 $num3;
  515.         return $this;
  516.     }
  517.     public function getNum4(): ?int
  518.     {
  519.         return $this->num4;
  520.     }
  521.     public function setNum4(int $num4): self
  522.     {
  523.         $this->num4 $num4;
  524.         return $this;
  525.     }
  526.     public function getInpack(): ?string
  527.     {
  528.         return $this->inpack;
  529.     }
  530.     public function setInpack(string $inpack): self
  531.     {
  532.         $this->inpack $inpack;
  533.         return $this;
  534.     }
  535.     public function getInpack2(): ?string
  536.     {
  537.         return $this->inpack2;
  538.     }
  539.     public function setInpack2(string $inpack2): self
  540.     {
  541.         $this->inpack2 $inpack2;
  542.         return $this;
  543.     }
  544.     public function getInpack3(): ?string
  545.     {
  546.         return $this->inpack3;
  547.     }
  548.     public function setInpack3(string $inpack3): self
  549.     {
  550.         $this->inpack3 $inpack3;
  551.         return $this;
  552.     }
  553.     public function getInpack4(): ?string
  554.     {
  555.         return $this->inpack4;
  556.     }
  557.     public function setInpack4(string $inpack4): self
  558.     {
  559.         $this->inpack4 $inpack4;
  560.         return $this;
  561.     }
  562.     public function getWeight(): ?int
  563.     {
  564.         return $this->weight;
  565.     }
  566.     public function setWeight(int $weight): self
  567.     {
  568.         $this->weight $weight;
  569.         return $this;
  570.     }
  571.     public function getWeight2(): ?int
  572.     {
  573.         return $this->weight2;
  574.     }
  575.     public function setWeight2(int $weight2): self
  576.     {
  577.         $this->weight2 $weight2;
  578.         return $this;
  579.     }
  580.     public function getWeight3(): ?int
  581.     {
  582.         return $this->weight3;
  583.     }
  584.     public function setWeight3(int $weight3): self
  585.     {
  586.         $this->weight3 $weight3;
  587.         return $this;
  588.     }
  589.     public function getWeight4(): ?int
  590.     {
  591.         return $this->weight4;
  592.     }
  593.     public function setWeight4(int $weight4): self
  594.     {
  595.         $this->weight4 $weight4;
  596.         return $this;
  597.     }
  598.     public function isVisible(): ?bool
  599.     {
  600.         return $this->visible;
  601.     }
  602.     public function setVisible(bool $visible): self
  603.     {
  604.         $this->visible $visible;
  605.         return $this;
  606.     }
  607.     public function isPop(): ?bool
  608.     {
  609.         return $this->pop;
  610.     }
  611.     public function setPop(bool $pop): self
  612.     {
  613.         $this->pop $pop;
  614.         return $this;
  615.     }
  616.     public function isAction(): ?bool
  617.     {
  618.         return $this->action;
  619.     }
  620.     public function setAction(bool $action): self
  621.     {
  622.         $this->action $action;
  623.         return $this;
  624.     }
  625.     public function isMix(): ?bool
  626.     {
  627.         return $this->mix;
  628.     }
  629.     public function setMix(bool $mix): self
  630.     {
  631.         $this->mix $mix;
  632.         return $this;
  633.     }
  634.     public function isMain(): ?bool
  635.     {
  636.         return $this->main;
  637.     }
  638.     public function setMain(bool $main): self
  639.     {
  640.         $this->main $main;
  641.         return $this;
  642.     }
  643.     public function isNew(): ?bool
  644.     {
  645.         return $this->new;
  646.     }
  647.     public function setNew(bool $new): self
  648.     {
  649.         $this->new $new;
  650.         return $this;
  651.     }
  652.     public function isSale(): ?bool
  653.     {
  654.         return $this->sale;
  655.     }
  656.     public function setSale(bool $sale): self
  657.     {
  658.         $this->sale $sale;
  659.         return $this;
  660.     }
  661.     public function isOnsale(): ?bool
  662.     {
  663.         return $this->onsale;
  664.     }
  665.     public function setOnsale(bool $onsale): self
  666.     {
  667.         $this->onsale $onsale;
  668.         return $this;
  669.     }
  670.     public function getPrior(): ?int
  671.     {
  672.         return $this->prior;
  673.     }
  674.     public function setPrior(int $prior): self
  675.     {
  676.         $this->prior $prior;
  677.         return $this;
  678.     }
  679.     public function getTitle(): ?string
  680.     {
  681.         return $this->title;
  682.     }
  683.     public function setTitle(string $title): self
  684.     {
  685.         $this->title $title;
  686.         return $this;
  687.     }
  688.     public function getDescr(): ?string
  689.     {
  690.         return $this->descr;
  691.     }
  692.     public function setDescr(string $descr): self
  693.     {
  694.         $this->descr $descr;
  695.         return $this;
  696.     }
  697.     public function getKw(): ?string
  698.     {
  699.         return $this->kw;
  700.     }
  701.     public function setKw(string $kw): self
  702.     {
  703.         $this->kw $kw;
  704.         return $this;
  705.     }
  706.     public function getH1(): ?string
  707.     {
  708.         return $this->h1;
  709.     }
  710.     public function setH1(string $h1): self
  711.     {
  712.         $this->h1 $h1;
  713.         return $this;
  714.     }
  715.     public function getRating(): ?int
  716.     {
  717.         return $this->rating;
  718.     }
  719.     public function setRating(int $rating): self
  720.     {
  721.         $this->rating $rating;
  722.         return $this;
  723.     }
  724.     public function getSpec(): ?string
  725.     {
  726.         return $this->spec;
  727.     }
  728.     public function setSpec(string $spec): self
  729.     {
  730.         $this->spec $spec;
  731.         return $this;
  732.     }
  733.     public function getOrdered(): ?int
  734.     {
  735.         return $this->ordered;
  736.     }
  737.     public function setOrdered(int $ordered): self
  738.     {
  739.         $this->ordered $ordered;
  740.         return $this;
  741.     }
  742.     public function getIzm(): ?string
  743.     {
  744.         return $this->izm;
  745.     }
  746.     public function setIzm(string $izm): self
  747.     {
  748.         $this->izm $izm;
  749.         return $this;
  750.     }
  751.     public function getPic(): ?string
  752.     {
  753.         return $this->pic;
  754.     }
  755.     public function setPic(string $pic): self
  756.     {
  757.         $this->pic $pic;
  758.         return $this;
  759.     }
  760.     public function getViews(): ?int
  761.     {
  762.         return $this->views;
  763.     }
  764.     public function setViews(int $views): self
  765.     {
  766.         $this->views $views;
  767.         return $this;
  768.     }
  769.     public function isJustuploaded(): ?bool
  770.     {
  771.         return $this->justuploaded;
  772.     }
  773.     public function setJustuploaded(bool $justuploaded): self
  774.     {
  775.         $this->justuploaded $justuploaded;
  776.         return $this;
  777.     }
  778.     public function getUploaded(): ?int
  779.     {
  780.         return $this->uploaded;
  781.     }
  782.     public function setUploaded(int $uploaded): self
  783.     {
  784.         $this->uploaded $uploaded;
  785.         return $this;
  786.     }
  787.     public function getChanged(): ?int
  788.     {
  789.         return $this->changed;
  790.     }
  791.     public function setChanged(int $changed): self
  792.     {
  793.         $this->changed $changed;
  794.         return $this;
  795.     }
  796.     public function getColors(): array
  797.     {
  798.         if(!in_array($this->getId(), $this->colors)) {
  799.             $this->colors = [];
  800.             array_push($this->colors$this->getId());
  801.         }
  802.         sort($this->colors);
  803.         return $this->colors;
  804.     }
  805.     public function setColors(array $colors): self
  806.     {
  807.         $this->colors $colors;
  808.         return $this;
  809.     }
  810.     public function getSku(): ?string
  811.     {
  812.         return $this->sku;
  813.     }
  814.     public function setSku(string $sku): self
  815.     {
  816.         $this->sku $sku;
  817.         return $this;
  818.     }
  819.     public function getModel(): ?string
  820.     {
  821.         return $this->model;
  822.     }
  823.     public function setModel(string $model): self
  824.     {
  825.         $this->model $model;
  826.         return $this;
  827.     }
  828.     public function getChars(): ?string
  829.     {
  830.         return $this->chars;
  831.     }
  832.     public function setChars(string $chars): self
  833.     {
  834.         $this->chars $chars;
  835.         return $this;
  836.     }
  837.     public function getTags(): ?string
  838.     {
  839.         return $this->tags;
  840.     }
  841.     public function setTags(string $tags): self
  842.     {
  843.         $this->tags $tags;
  844.         return $this;
  845.     }
  846.     public function getExternalId(): ?string
  847.     {
  848.         return $this->externalId;
  849.     }
  850.     public function setExternalId(?string $externalId): self
  851.     {
  852.         $this->externalId $externalId;
  853.         return $this;
  854.     }
  855. }