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