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 ?bool $selection1 null;
  139.     #[ORM\Column]
  140.     private ?bool $selection2 null;
  141.     #[ORM\Column]
  142.     private ?int $prior null;
  143.     #[GedmoTranslatable]
  144.     #[ORM\Column(length1000)]
  145.     private ?string $title null;
  146.     #[GedmoTranslatable]
  147.     #[ORM\Column(length1000)]
  148.     private ?string $descr null;
  149.     #[GedmoTranslatable]
  150.     #[ORM\Column(length1000)]
  151.     private ?string $kw null;
  152.     #[GedmoTranslatable]
  153.     #[ORM\Column(length1000)]
  154.     private ?string $h1 null;
  155.     #[ORM\Column]
  156.     private ?int $rating null;
  157.     #[ORM\Column(length255)]
  158.     private ?string $spec null;
  159.     #[ORM\Column]
  160.     private ?int $ordered null;
  161.     #[ORM\Column(length255)]
  162.     private ?string $izm null;
  163.     #[ORM\Column(length255)]
  164.     private ?string $pic null;
  165.     #[ORM\Column]
  166.     private ?int $views null;
  167.     #[ORM\Column]
  168.     private ?bool $justuploaded null;
  169.     #[ORM\Column]
  170.     private ?int $uploaded null;
  171.     #[ORM\Column]
  172.     private ?int $changed null;
  173.     // #[ORM\Column]
  174.     // private ?array $colors;
  175.     #[ORM\Column(length255)]
  176.     private ?string $sku null;
  177.     #[ORM\Column(length255)]
  178.     private ?string $model null;
  179.     #[ORM\Column(length1000)]
  180.     private ?string $chars null;
  181.     #[ORM\Column(length1000)]
  182.     private ?string $tags null;
  183.     public $prices = [];
  184.     public $photos = [];
  185.     public $childs = [];
  186.     public $colors = [];
  187.     public $sizes = [];
  188.     public $inpacks = [];
  189.     #[GedmoLocale]
  190.     private $locale;
  191.     #[ORM\OneToMany(targetEntityProdTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  192.     private $translations;
  193.     #[ORM\Column(length255nullabletrue)]
  194.     private ?string $externalId null;
  195.     public function __construct()
  196.     {
  197.         $this->colors = [];
  198.         $this->numdiscount = [];
  199.         $this->numdiscount2 = [];
  200.         $this->numdiscount3 = [];
  201.         $this->numdiscount4 = [];
  202.         $this->numdiscountopt = [];
  203.         $this->numdiscountopt2 = [];
  204.         $this->numdiscountopt3 = [];
  205.         $this->numdiscountopt4 = [];
  206.         $this->translations = new ArrayCollection();
  207.     }
  208.     public function setLocale($locale)
  209.     {
  210.         $this->locale $locale;
  211.     }
  212.     public function getTranslations()
  213.     {
  214.         return $this->translations;
  215.     }
  216.     public function addTranslation(ProdTranslation $t)
  217.     {
  218.         if (!$this->translations->contains($t)) {
  219.             $this->translations[] = $t;
  220.             $t->setObject($this);
  221.         }
  222.     }
  223.     
  224.     public function getId(): ?int
  225.     {
  226.         return $this->id;
  227.     }
  228.     public function getCat(): int
  229.     {
  230.         return $this->cat;
  231.     }
  232.     public function setCat(int $cat): self
  233.     {
  234.         $this->cat $cat;
  235.         return $this;
  236.     }
  237.     public function getIntname(): ?string
  238.     {
  239.         return $this->intname;
  240.     }
  241.     public function setIntname(string $intname): self
  242.     {
  243.         $this->intname $intname;
  244.         return $this;
  245.     }
  246.     public function getName(): ?string
  247.     {
  248.         return $this->name;
  249.     }
  250.     public function setName(string $name): self
  251.     {
  252.         $this->name $name;
  253.         return $this;
  254.     }
  255.     public function getNameUk(): ?string
  256.     {
  257.         foreach ($this->translations as $translation) {
  258.             if ($translation->getLocale() === 'uk') {
  259.                 return $translation->getContent();
  260.             }
  261.         }
  262.         
  263.         return $this->name;
  264.     }
  265.     public function getNameRu(): ?string
  266.     {
  267.         foreach ($this->translations as $translation) {
  268.             if ($translation->getLocale() === 'ru') {
  269.                 return $translation->getContent();
  270.             }
  271.         }
  272.         return $this->name;
  273.     }
  274.     public function getNamePl(): ?string
  275.     {
  276.         foreach ($this->translations as $translation) {
  277.             if ($translation->getLocale() === 'pl') {
  278.                 return $translation->getContent();
  279.             }
  280.         }
  281.         return $this->name;
  282.     }
  283.     public function getArt(): ?string
  284.     {
  285.         return $this->art;
  286.     }
  287.     public function setArt(string $art): self
  288.     {
  289.         $this->art $art;
  290.         return $this;
  291.     }
  292.     public function getShort(): ?string
  293.     {
  294.         return $this->short;
  295.     }
  296.     public function setShort(string $short): self
  297.     {
  298.         $this->short $short;
  299.         return $this;
  300.     }
  301.     public function getCont(): ?string
  302.     {
  303.         return str_replace(["|"], ["<br>"], $this->cont);
  304.     }
  305.     public function setCont(string $cont): self
  306.     {
  307.         $this->cont $cont;
  308.         return $this;
  309.     }
  310.     public function setPrices(array $prices)
  311.     {
  312.         $this->prices $prices;
  313.     }
  314.     public function getPrices(): array
  315.     {
  316.         return $this->prices;
  317.     }
  318.     public function getPrice(): ?float
  319.     {
  320.         return Env::is_opt() ? $this->priceopt $this->price;
  321.     }
  322.     public function setPrice(float $price): self
  323.     {
  324.         $this->price $price;
  325.         return $this;
  326.     }
  327.     public function getPrice2(): ?float
  328.     {
  329.         return Env::is_opt() ? $this->priceopt2 $this->price2;
  330.     }
  331.     public function setPrice2(float $price2): self
  332.     {
  333.         $this->price2 $price2;
  334.         return $this;
  335.     }
  336.     public function getPrice3(): ?float
  337.     {
  338.         return Env::is_opt() ? $this->priceopt3 $this->price3;
  339.     }
  340.     public function setPrice3(float $price3): self
  341.     {
  342.         $this->price3 $price3;
  343.         return $this;
  344.     }
  345.     public function getPrice4(): ?float
  346.     {
  347.         return Env::is_opt() ? $this->priceopt4 $this->price4;
  348.     }
  349.     public function setPrice4(float $price4): self
  350.     {
  351.         $this->price4 $price4;
  352.         return $this;
  353.     }
  354.     public function getPriceopt(): ?float
  355.     {
  356.         return $this->priceopt;
  357.     }
  358.     public function setPriceopt(float $priceopt): self
  359.     {
  360.         $this->priceopt $priceopt;
  361.         return $this;
  362.     }
  363.     public function getPriceopt2(): ?float
  364.     {
  365.         return $this->priceopt2;
  366.     }
  367.     public function setPriceopt2(float $priceopt2): self
  368.     {
  369.         $this->priceopt2 $priceopt2;
  370.         return $this;
  371.     }
  372.     public function getPriceopt3(): ?float
  373.     {
  374.         return $this->priceopt3;
  375.     }
  376.     public function setPriceopt3(float $priceopt3): self
  377.     {
  378.         $this->priceopt3 $priceopt3;
  379.         return $this;
  380.     }
  381.     public function getPriceopt4(): ?float
  382.     {
  383.         return $this->priceopt4;
  384.     }
  385.     public function setPriceopt4(float $priceopt4): self
  386.     {
  387.         $this->priceopt4 $priceopt4;
  388.         return $this;
  389.     }
  390.     public function getSkidka(): ?float
  391.     {
  392.         return Env::is_opt() ? $this->skidkaopt $this->skidka;
  393.     }
  394.     public function setSkidka(float $skidka): self
  395.     {
  396.         $this->skidka $skidka;
  397.         return $this;
  398.     }
  399.     public function getSkidka2(): ?float
  400.     {
  401.         return Env::is_opt() ? $this->skidkaopt2 $this->skidka2;
  402.     }
  403.     public function setSkidka2(float $skidka2): self
  404.     {
  405.         $this->skidka2 $skidka2;
  406.         return $this;
  407.     }
  408.     public function getSkidka3(): ?float
  409.     {
  410.         return Env::is_opt() ? $this->skidkaopt3 $this->skidka3;
  411.     }
  412.     public function setSkidka3(float $skidka3): self
  413.     {
  414.         $this->skidka3 $skidka3;
  415.         return $this;
  416.     }
  417.     public function getSkidka4(): ?float
  418.     {
  419.         return Env::is_opt() ? $this->skidkaopt4 $this->skidka4;
  420.     }
  421.     public function setSkidka4(float $skidka4): self
  422.     {
  423.         $this->skidka4 $skidka4;
  424.         return $this;
  425.     }
  426.     public function getSkidkaopt(): ?float
  427.     {
  428.         return $this->skidkaopt;
  429.     }
  430.     public function setSkidkaopt(float $skidkaopt): self
  431.     {
  432.         $this->skidkaopt $skidkaopt;
  433.         return $this;
  434.     }
  435.     public function getSkidkaopt2(): ?float
  436.     {
  437.         return $this->skidkaopt2;
  438.     }
  439.     public function setSkidkaopt2(float $skidkaopt2): self
  440.     {
  441.         $this->skidkaopt2 $skidkaopt2;
  442.         return $this;
  443.     }
  444.     public function getSkidkaopt3(): ?float
  445.     {
  446.         return $this->skidkaopt3;
  447.     }
  448.     public function setSkidkaopt3(float $skidkaopt3): self
  449.     {
  450.         $this->skidkaopt3 $skidkaopt3;
  451.         return $this;
  452.     }
  453.     public function getSkidkaopt4(): ?float
  454.     {
  455.         return $this->skidkaopt4;
  456.     }
  457.     public function setSkidkaopt4(float $skidkaopt4): self
  458.     {
  459.         $this->skidkaopt4 $skidkaopt4;
  460.         return $this;
  461.     }
  462.     public function getNumdiscount(): array
  463.     {
  464.         if (!$this->numdiscount) {
  465.             return [];
  466.         }
  467.         return Env::is_opt() ? $this->numdiscountopt $this->numdiscount;
  468.     }
  469.     public function setNumdiscount(array $numdiscount): self
  470.     {
  471.         $this->numdiscount $numdiscount;
  472.         return $this;
  473.     }
  474.     public function getNumdiscount2(): array
  475.     {
  476.         if (!$this->numdiscount2) {
  477.             return [];
  478.         }
  479.         return Env::is_opt() ? $this->numdiscountopt2 $this->numdiscount2;
  480.     }
  481.     public function setNumdiscount2(array $numdiscount2): self
  482.     {
  483.         $this->numdiscount2 $numdiscount2;
  484.         return $this;
  485.     }
  486.     public function getNumdiscount3(): array
  487.     {
  488.         if (!$this->numdiscount3) {
  489.             return [];
  490.         }
  491.         return Env::is_opt() ? $this->numdiscountopt3 $this->numdiscount3;
  492.     }
  493.     public function setNumdiscount3(array $numdiscount3): self
  494.     {
  495.         $this->numdiscount3 $numdiscount3;
  496.         return $this;
  497.     }
  498.     public function getNumdiscount4(): array
  499.     {
  500.         if (!$this->numdiscount4) {
  501.             return [];
  502.         }
  503.         return Env::is_opt() ? $this->numdiscountopt4 $this->numdiscount4;
  504.     }
  505.     public function setNumdiscount4(array $numdiscount4): self
  506.     {
  507.         $this->numdiscount4 $numdiscount4;
  508.         return $this;
  509.     }
  510.     public function getNumdiscountopt(): array
  511.     {
  512.         if (!$this->numdiscountopt) {
  513.             return [];
  514.         }
  515.         return $this->numdiscountopt;
  516.     }
  517.     public function setNumdiscountopt(array $numdiscountopt): self
  518.     {
  519.         $this->numdiscountopt $numdiscountopt;
  520.         return $this;
  521.     }
  522.     public function getNumdiscountopt2(): array
  523.     {
  524.         if (!$this->numdiscountopt2) {
  525.             return [];
  526.         }
  527.         return $this->numdiscountopt2;
  528.     }
  529.     public function setNumdiscountopt2(array $numdiscountopt2): self
  530.     {
  531.         $this->numdiscountopt2 $numdiscountopt2;
  532.         return $this;
  533.     }
  534.     public function getNumdiscountopt3(): array
  535.     {
  536.         if (!$this->numdiscountopt3) {
  537.             return [];
  538.         }
  539.         return $this->numdiscountopt3;
  540.     }
  541.     public function setNumdiscountopt3(array $numdiscountopt3): self
  542.     {
  543.         $this->numdiscountopt3 $numdiscountopt3;
  544.         return $this;
  545.     }
  546.     public function getNumdiscountopt4(): array
  547.     {
  548.         if (!$this->numdiscountopt4) {
  549.             return [];
  550.         }
  551.         return $this->numdiscountopt4;
  552.     }
  553.     public function setNumdiscountopt4(array $numdiscountopt4): self
  554.     {
  555.         $this->numdiscountopt4 $numdiscountopt4;
  556.         return $this;
  557.     }
  558.     public function getNum(): ?int
  559.     {
  560.         return $this->num;
  561.     }
  562.     public function setNum(int $num): self
  563.     {
  564.         $this->num $num;
  565.         return $this;
  566.     }
  567.     public function getNum2(): ?int
  568.     {
  569.         return $this->num2;
  570.     }
  571.     public function setNum2(int $num2): self
  572.     {
  573.         $this->num2 $num2;
  574.         return $this;
  575.     }
  576.     public function getNum3(): ?int
  577.     {
  578.         return $this->num3;
  579.     }
  580.     public function setNum3(int $num3): self
  581.     {
  582.         $this->num3 $num3;
  583.         return $this;
  584.     }
  585.     public function getNum4(): ?int
  586.     {
  587.         return $this->num4;
  588.     }
  589.     public function setNum4(int $num4): self
  590.     {
  591.         $this->num4 $num4;
  592.         return $this;
  593.     }
  594.     public function getInpack(): ?string
  595.     {
  596.         return $this->inpack;
  597.     }
  598.     public function setInpack(string $inpack): self
  599.     {
  600.         $this->inpack $inpack;
  601.         return $this;
  602.     }
  603.     public function getInpack2(): ?string
  604.     {
  605.         return $this->inpack2;
  606.     }
  607.     public function setInpack2(string $inpack2): self
  608.     {
  609.         $this->inpack2 $inpack2;
  610.         return $this;
  611.     }
  612.     public function getInpack3(): ?string
  613.     {
  614.         return $this->inpack3;
  615.     }
  616.     public function setInpack3(string $inpack3): self
  617.     {
  618.         $this->inpack3 $inpack3;
  619.         return $this;
  620.     }
  621.     public function getInpack4(): ?string
  622.     {
  623.         return $this->inpack4;
  624.     }
  625.     public function setInpack4(string $inpack4): self
  626.     {
  627.         $this->inpack4 $inpack4;
  628.         return $this;
  629.     }
  630.     public function getWeight(): ?int
  631.     {
  632.         return $this->weight;
  633.     }
  634.     public function setWeight(int $weight): self
  635.     {
  636.         $this->weight $weight;
  637.         return $this;
  638.     }
  639.     public function getWeight2(): ?int
  640.     {
  641.         return $this->weight2;
  642.     }
  643.     public function setWeight2(int $weight2): self
  644.     {
  645.         $this->weight2 $weight2;
  646.         return $this;
  647.     }
  648.     public function getWeight3(): ?int
  649.     {
  650.         return $this->weight3;
  651.     }
  652.     public function setWeight3(int $weight3): self
  653.     {
  654.         $this->weight3 $weight3;
  655.         return $this;
  656.     }
  657.     public function getWeight4(): ?int
  658.     {
  659.         return $this->weight4;
  660.     }
  661.     public function setWeight4(int $weight4): self
  662.     {
  663.         $this->weight4 $weight4;
  664.         return $this;
  665.     }
  666.     public function isVisible(): ?bool
  667.     {
  668.         return $this->visible;
  669.     }
  670.     public function setVisible(bool $visible): self
  671.     {
  672.         $this->visible $visible;
  673.         return $this;
  674.     }
  675.     public function isPop(): ?bool
  676.     {
  677.         return $this->pop;
  678.     }
  679.     public function setPop(bool $pop): self
  680.     {
  681.         $this->pop $pop;
  682.         return $this;
  683.     }
  684.     public function isAction(): ?bool
  685.     {
  686.         return $this->action;
  687.     }
  688.     public function setAction(bool $action): self
  689.     {
  690.         $this->action $action;
  691.         return $this;
  692.     }
  693.     public function isMix(): ?bool
  694.     {
  695.         return $this->mix;
  696.     }
  697.     public function setMix(bool $mix): self
  698.     {
  699.         $this->mix $mix;
  700.         return $this;
  701.     }
  702.     public function isMain(): ?bool
  703.     {
  704.         return $this->main;
  705.     }
  706.     public function setMain(bool $main): self
  707.     {
  708.         $this->main $main;
  709.         return $this;
  710.     }
  711.     public function isNew(): ?bool
  712.     {
  713.         return $this->new;
  714.     }
  715.     public function setNew(bool $new): self
  716.     {
  717.         $this->new $new;
  718.         return $this;
  719.     }
  720.     public function isSale(): ?bool
  721.     {
  722.         return $this->sale;
  723.     }
  724.     public function setSale(bool $sale): self
  725.     {
  726.         $this->sale $sale;
  727.         return $this;
  728.     }
  729.     public function isOnsale(): ?bool
  730.     {
  731.         return $this->onsale;
  732.     }
  733.     public function setOnsale(bool $onsale): self
  734.     {
  735.         $this->onsale $onsale;
  736.         return $this;
  737.     }
  738.     public function isSelection1(): ?bool
  739.     {
  740.         return $this->selection1;
  741.     }
  742.     public function setSelection1(bool $selection1): self
  743.     {
  744.         $this->selection1 $selection1;
  745.         return $this;
  746.     }
  747.     public function isSelection2(): ?bool
  748.     {
  749.         return $this->selection2;
  750.     }
  751.     public function setSelection2(bool $selection2): self
  752.     {
  753.         $this->selection2 $selection2;
  754.         return $this;
  755.     }
  756.     public function getPrior(): ?int
  757.     {
  758.         return $this->prior;
  759.     }
  760.     public function setPrior(int $prior): self
  761.     {
  762.         $this->prior $prior;
  763.         return $this;
  764.     }
  765.     public function getTitle(): ?string
  766.     {
  767.         return $this->title;
  768.     }
  769.     public function setTitle(string $title): self
  770.     {
  771.         $this->title $title;
  772.         return $this;
  773.     }
  774.     public function getDescr(): ?string
  775.     {
  776.         return $this->descr;
  777.     }
  778.     public function setDescr(string $descr): self
  779.     {
  780.         $this->descr $descr;
  781.         return $this;
  782.     }
  783.     public function getKw(): ?string
  784.     {
  785.         return $this->kw;
  786.     }
  787.     public function setKw(string $kw): self
  788.     {
  789.         $this->kw $kw;
  790.         return $this;
  791.     }
  792.     public function getH1(): ?string
  793.     {
  794.         return $this->h1;
  795.     }
  796.     public function setH1(string $h1): self
  797.     {
  798.         $this->h1 $h1;
  799.         return $this;
  800.     }
  801.     public function getRating(): ?int
  802.     {
  803.         return $this->rating;
  804.     }
  805.     public function setRating(int $rating): self
  806.     {
  807.         $this->rating $rating;
  808.         return $this;
  809.     }
  810.     public function getSpec(): ?string
  811.     {
  812.         return $this->spec;
  813.     }
  814.     public function setSpec(string $spec): self
  815.     {
  816.         $this->spec $spec;
  817.         return $this;
  818.     }
  819.     public function getOrdered(): ?int
  820.     {
  821.         return $this->ordered;
  822.     }
  823.     public function setOrdered(int $ordered): self
  824.     {
  825.         $this->ordered $ordered;
  826.         return $this;
  827.     }
  828.     public function getIzm(): ?string
  829.     {
  830.         return $this->izm;
  831.     }
  832.     public function setIzm(string $izm): self
  833.     {
  834.         $this->izm $izm;
  835.         return $this;
  836.     }
  837.     public function getPic(): ?string
  838.     {
  839.         return $this->pic;
  840.     }
  841.     public function setPic(string $pic): self
  842.     {
  843.         $this->pic $pic;
  844.         return $this;
  845.     }
  846.     public function getViews(): ?int
  847.     {
  848.         return $this->views;
  849.     }
  850.     public function setViews(int $views): self
  851.     {
  852.         $this->views $views;
  853.         return $this;
  854.     }
  855.     public function isJustuploaded(): ?bool
  856.     {
  857.         return $this->justuploaded;
  858.     }
  859.     public function setJustuploaded(bool $justuploaded): self
  860.     {
  861.         $this->justuploaded $justuploaded;
  862.         return $this;
  863.     }
  864.     public function getUploaded(): ?int
  865.     {
  866.         return $this->uploaded;
  867.     }
  868.     public function setUploaded(int $uploaded): self
  869.     {
  870.         $this->uploaded $uploaded;
  871.         return $this;
  872.     }
  873.     public function getChanged(): ?int
  874.     {
  875.         return $this->changed;
  876.     }
  877.     public function setChanged(int $changed): self
  878.     {
  879.         $this->changed $changed;
  880.         return $this;
  881.     }
  882.     public function getColors(): array
  883.     {
  884.         if (!$this->colors) {
  885.             return [];
  886.         }
  887.         if(!in_array($this->getId(), $this->colors)) {
  888.             $this->colors = [];
  889.             array_push($this->colors$this->getId());
  890.         }
  891.         sort($this->colors);
  892.         return $this->colors;
  893.     }
  894.     public function setColors(array $colors): self
  895.     {
  896.         $this->colors $colors;
  897.         return $this;
  898.     }
  899.     public function getSku(): ?string
  900.     {
  901.         return $this->sku;
  902.     }
  903.     public function setSku(string $sku): self
  904.     {
  905.         $this->sku $sku;
  906.         return $this;
  907.     }
  908.     public function getModel(): ?string
  909.     {
  910.         return $this->model;
  911.     }
  912.     public function setModel(string $model): self
  913.     {
  914.         $this->model $model;
  915.         return $this;
  916.     }
  917.     public function getChars(): ?string
  918.     {
  919.         return $this->chars;
  920.     }
  921.     public function setChars(string $chars): self
  922.     {
  923.         $this->chars $chars;
  924.         return $this;
  925.     }
  926.     public function getTags(): ?string
  927.     {
  928.         return $this->tags;
  929.     }
  930.     public function setTags(string $tags): self
  931.     {
  932.         $this->tags $tags;
  933.         return $this;
  934.     }
  935.     public function getExternalId(): ?string
  936.     {
  937.         return $this->externalId;
  938.     }
  939.     public function setExternalId(?string $externalId): self
  940.     {
  941.         $this->externalId $externalId;
  942.         return $this;
  943.     }
  944. }