src/AtechNet/CoreBundle/Entity/CategoryPage.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\JoinColumn;
  7. use Doctrine\ORM\Mapping\JoinTable;
  8. use Doctrine\ORM\Mapping\ManyToMany;
  9. use Doctrine\ORM\Mapping\ManyToOne;
  10. use Doctrine\ORM\Mapping\OneToMany;
  11. use Doctrine\ORM\Mapping\OrderBy;
  12. use Doctrine\ORM\Mapping\Table as Table;
  13. /**
  14.  * CategoryPage
  15.  *
  16.  * @Table(name="pages_category")
  17.  * @Entity(repositoryClass="App\AtechNet\CoreBundle\Repository\CategoryPageRepository")
  18.  */
  19. class CategoryPage extends AbstractPage
  20. {
  21.     public const CATEGORY_TYPE_PRODUCT = 1;
  22.     public const CATEGORY_TYPE_BLOG = 2;
  23.     public const SK_CATEGORYPAGE_ID_NOTEBOOK = 5;
  24.     public const SK_CATEGORYPAGE_ID_PC = 4;
  25.     public const SK_CATEGORYPAGE_ID_MONITOR = 6;
  26.     public const SK_CATEGORYPAGE_ID_MOBIL = 236;
  27.     public const SK_CATEGORYPAGE_ID_TABLET = 269;
  28.     public const SK_CATEGORYPAGE_ID_SMARTWATCH = 272;
  29.     public const SK_CATEGORYPAGE_ID_ELECTRIC_SCOOTER = 493;
  30.     public const HU_CATEGORYPAGE_ID_NOTEBOOK = 56;
  31.     public const HU_CATEGORYPAGE_ID_PC = 48;
  32.     public const HU_CATEGORYPAGE_ID_MONITOR = 78;
  33.     public const HU_CATEGORYPAGE_ID_MOBIL = 235;
  34.     public const HU_CATEGORYPAGE_ID_TABLET = 268;
  35.     public const HU_CATEGORYPAGE_ID_SMARTWATCH = 271;
  36.     public const HU_CATEGORYPAGE_ID_ELECTRIC_SCOOTER = 492;
  37.     public const CZ_CATEGORYPAGE_ID_NOTEBOOK = 130;
  38.     public const CZ_CATEGORYPAGE_ID_PC = 122;
  39.     public const CZ_CATEGORYPAGE_ID_MONITOR = 149;
  40.     public const CZ_CATEGORYPAGE_ID_MOBIL = 239;
  41.     public const CZ_CATEGORYPAGE_ID_TABLET = 270;
  42.     public const CZ_CATEGORYPAGE_ID_SMARTWATCH = 364;
  43.     public const CZ_CATEGORYPAGE_ID_ELECTRIC_SCOOTER = 494;
  44.     public const EU_CATEGORYPAGE_ID_NOTEBOOK = 285;
  45.     public const EU_CATEGORYPAGE_ID_PC = 277;
  46.     public const EU_CATEGORYPAGE_ID_MONITOR = 304;
  47.     public const EU_CATEGORYPAGE_ID_MOBIL = 350;
  48.     public const EU_CATEGORYPAGE_ID_TABLET = 360;
  49.     public const EU_CATEGORYPAGE_ID_SMARTWATCH = 361;
  50.     public const EU_CATEGORYPAGE_ID_ELECTRIC_SCOOTER = 598;
  51.     public const SK_CATEGORYPAGE_ID_SALE = 622;
  52.     public const HU_CATEGORYPAGE_ID_SALE = 621;
  53.     public const CZ_CATEGORYPAGE_ID_SALE = 623;
  54.     public const EU_CATEGORYPAGE_ID_SALE = 624;
  55.     public const MARKETING_FESZT = 659;
  56.     public const UJVARI_FURDO_BANNER_SK = 669;
  57.     public const UJVARI_FURDO_BANNER_HU = 674;
  58.     public const UJVARI_FURDO_BANNER_CZ = 675;
  59.     public const PRODUCT_TYPE_NORMAL = 1;
  60.     public const PRODUCT_TYPE_PRIORITY = 2;
  61.     public const PRODUCT_TYPE_POPULAR = 3;
  62.     /**
  63.      * @return array
  64.      */
  65.     public static function getCategoryTypeChoices(): array
  66.     {
  67.         return [
  68.             self::CATEGORY_TYPE_PRODUCT => 'Product',
  69.             self::CATEGORY_TYPE_BLOG    => 'Blog',
  70.         ];
  71.     }
  72.     public const SALE_CATEGORY_PAGES = [
  73.         self::SK_CATEGORYPAGE_ID_SALE,
  74.         self::HU_CATEGORYPAGE_ID_SALE,
  75.         self::CZ_CATEGORYPAGE_ID_SALE,
  76.         self::EU_CATEGORYPAGE_ID_SALE,
  77.         //MARKETING FESZT
  78.         self::MARKETING_FESZT,
  79.         //
  80.         self::UJVARI_FURDO_BANNER_SK,
  81.         self::UJVARI_FURDO_BANNER_HU,
  82.         self::UJVARI_FURDO_BANNER_CZ,
  83.     ];
  84.     private const PRODUCT_TYPE_FILTERS = [
  85.         ProductType::PRODUCT_TYPE_ID_NOTEBOOK   => [
  86.             Attribute::ATTRIBUTE_ID_YEAR_OF_PRODUCTION,
  87.             Attribute::ATTRIBUTE_ID_QUALITY,
  88.             Attribute::ATTRIBUTE_ID_ACCESSORY_OS,
  89.             Attribute::ATTRIBUTE_ID_SCREEN_SIZE,
  90.             Attribute::ATTRIBUTE_ID_CPU_MARK,
  91.             Attribute::ATTRIBUTE_ID_RAM_SIZE,
  92.             Attribute::ATTRIBUTE_ID_SSD,
  93.             Attribute::ATTRIBUTE_ID_CPU_NB_FAMILY,
  94.             Attribute::ATTRIBUTE_ID_MAXIMUM_RESOLUTION,
  95.             Attribute::ATTRIBUTE_ID_CONF_NOTEBOOK_SKIN,
  96.             Attribute::ATTRIBUTE_ID_TOUCH_SCREEN,
  97.             Attribute::ATTRIBUTE_ID_WEBCAM,
  98.             Attribute::ATTRIBUTE_ID_EXTERNAL_CONNECTORS,
  99.             Attribute::ATTRIBUTE_ID_NUMPAD,
  100.             Attribute::ATTRIBUTE_ID_CPU_GENERATION,
  101.             Attribute::ATTRIBUTE_ID_VGA,
  102.             Attribute::ATTRIBUTE_ID_MEMORY_TYPE,
  103.             Attribute::ATTRIBUTE_ID_DISPLAY_TECHNOLOGY,
  104.             Attribute::ATTRIBUTE_ID_OPTICAL_DRIVER,
  105.             Attribute::ATTRIBUTE_ID_HDD_25,
  106.             Attribute::ATTRIBUTE_ID_BATTERY,
  107.         ],
  108.         ProductType::PRODUCT_TYPE_ID_PC         => [
  109.             Attribute::ATTRIBUTE_ID_QUALITY,
  110.             Attribute::ATTRIBUTE_ID_OPERATING_SYSTEM,
  111.             Attribute::ATTRIBUTE_ID_RAM_SIZE,
  112.             Attribute::ATTRIBUTE_ID_MEMORY_TYPE,
  113.             Attribute::ATTRIBUTE_ID_CPU_PC_FAMILY,
  114.             Attribute::ATTRIBUTE_ID_CPU_GENERATION,
  115.             Attribute::ATTRIBUTE_ID_HDD_25,
  116.             Attribute::ATTRIBUTE_ID_SSD,
  117.             Attribute::ATTRIBUTE_ID_FORM,
  118.             Attribute::ATTRIBUTE_ID_EXTERNAL_CONNECTORS,
  119.             Attribute::ATTRIBUTE_ID_OPTICAL_DRIVER,
  120.         ],
  121.         ProductType::PRODUCT_TYPE_ID_MONITOR    => [
  122.             Attribute::ATTRIBUTE_ID_QUALITY,
  123.             Attribute::ATTRIBUTE_ID_SCREEN_SIZE,
  124.             Attribute::ATTRIBUTE_ID_MAXIMUM_RESOLUTION,
  125.             Attribute::ATTRIBUTE_ID_ASPECT_RATIO,
  126.             Attribute::ATTRIBUTE_ID_CONTRAST,
  127.             Attribute::ATTRIBUTE_ID_SCREEN_REFRESH_RATE,
  128.             Attribute::ATTRIBUTE_ID_RESPONSE_TIME,
  129.             Attribute::ATTRIBUTE_ID_GRAPHIC_INPUTS,
  130.             Attribute::ATTRIBUTE_ID_VESA,
  131.             Attribute::ATTRIBUTE_ID_SPEAKER,
  132.             Attribute::ATTRIBUTE_ID_DISPLAY_TECHNOLOGY,
  133.             Attribute::ATTRIBUTE_ID_TOUCH_SCREEN,
  134.         ],
  135.         ProductType::PRODUCT_TYPE_ID_SMARTPHONE => [
  136.             Attribute::ATTRIBUTE_ID_QUALITY,
  137.             Attribute::ATTRIBUTE_ID_OPERATING_SYSTEM,
  138.             Attribute::ATTRIBUTE_ID_SCREEN_SIZE,
  139.             Attribute::ATTRIBUTE_ID_MAXIMUM_RESOLUTION,
  140.             Attribute::ATTRIBUTE_ID_MEMORY,
  141.             Attribute::ATTRIBUTE_ID_CPU_PHONE,
  142.         ],
  143.         ProductType::PRODUCT_TYPE_ID_TABLET     => [
  144.             Attribute::ATTRIBUTE_ID_QUALITY,
  145.             Attribute::ATTRIBUTE_ID_SCREEN_SIZE,
  146.             Attribute::ATTRIBUTE_ID_MAXIMUM_RESOLUTION,
  147.             Attribute::ATTRIBUTE_ID_MEMORY,
  148.             Attribute::ATTRIBUTE_ID_CPU_TABLET,
  149.         ],
  150.     ];
  151.     /**
  152.      * @param int $productType
  153.      *
  154.      * @return array
  155.      */
  156.     public static function getFiltersForProductType(int $productType): array
  157.     {
  158.         return self::PRODUCT_TYPE_FILTERS[$productType] ?? [];
  159.     }
  160.     /**
  161.      * @var int
  162.      *
  163.      * @Column(name="type", type="integer")
  164.      */
  165.     private $type;
  166.     /**
  167.      * @var Domain
  168.      *
  169.      * @ManyToOne(targetEntity="Domain")
  170.      * @JoinColumn(name="domain_id", referencedColumnName="id")
  171.      */
  172.     private $domain;
  173.     /**
  174.      * @var CategoryPage|null
  175.      *
  176.      * @ManyToOne(targetEntity="CategoryPage", inversedBy="subCategories")
  177.      * @JoinColumn(name="parent_category_id", referencedColumnName="id", nullable=true)
  178.      */
  179.     private $parentCategory;
  180.     /**
  181.      * @var ArrayCollection
  182.      *
  183.      * @ManyToMany(targetEntity="ProductType", inversedBy="categoryPages")
  184.      * @JoinTable(
  185.      *  name="category_pages_product_types",
  186.      *  joinColumns={
  187.      *      @JoinColumn(name="category_page_id", referencedColumnName="id")
  188.      *  },
  189.      *  inverseJoinColumns={
  190.      *      @JoinColumn(name="product_type_id", referencedColumnName="id")
  191.      *  }
  192.      * )
  193.      * @OrderBy({"id" = "DESC"})
  194.      */
  195.     private $productTypes;
  196.     /**
  197.      * @var ArrayCollection
  198.      *
  199.      * @ManyToMany(targetEntity="Product", inversedBy="categoryPages")
  200.      * @JoinTable(name="category_pages_products",
  201.      *  joinColumns={
  202.      *      @JoinColumn(name="category_page_id", referencedColumnName="id")
  203.      *  },
  204.      *  inverseJoinColumns={
  205.      *      @JoinColumn(name="product_id", referencedColumnName="id")
  206.      *  }
  207.      * )
  208.      * @OrderBy({"id" = "DESC"})
  209.      */
  210.     private $products;
  211.     /**
  212.      * @var ArrayCollection
  213.      *
  214.      * @ManyToMany(targetEntity="Product", inversedBy="popularProductsCategoryPages")
  215.      * @JoinTable(name="category_pages_popular_products",
  216.      *  joinColumns={
  217.      *      @JoinColumn(name="category_page_id", referencedColumnName="id")
  218.      *  },
  219.      *  inverseJoinColumns={
  220.      *      @JoinColumn(name="product_id", referencedColumnName="id")
  221.      *  }
  222.      * )
  223.      * @OrderBy({"id" = "DESC"})
  224.      */
  225.     private $popularProducts;
  226.     /**
  227.      * @var ArrayCollection
  228.      *
  229.      * @OneToMany(targetEntity="CategoryPage", mappedBy="parentCategory", orphanRemoval=true, cascade={"persist", "remove"})
  230.      * @OrderBy({"id" = "ASC"})
  231.      */
  232.     private $subCategories;
  233.     /**
  234.      * @var ArrayCollection<int,PageMeta>
  235.      *
  236.      * @OneToMany(targetEntity="PageMeta", mappedBy="categoryPage", orphanRemoval=true, cascade={"persist", "remove"})
  237.      * @OrderBy({"id" = "ASC"})
  238.      **/
  239.     private $metas;
  240.     /**
  241.      * @var ArrayCollection
  242.      *
  243.      * @OneToMany(targetEntity="CategoryPageFilterAttribute", mappedBy="categoryPage", orphanRemoval=true, cascade={"persist", "remove"})
  244.      * @OrderBy({"delta" = "ASC"})
  245.      */
  246.     private $filterAttributes;
  247.     /**
  248.      * @var ArrayCollection
  249.      *
  250.      * @ManyToMany(targetEntity="Vendor", inversedBy="categoryPages")
  251.      * @JoinTable(name="category_pages_vendors",
  252.      *  joinColumns={
  253.      *      @JoinColumn(name="category_page_id", referencedColumnName="id")
  254.      *  },
  255.      *  inverseJoinColumns={
  256.      *      @JoinColumn(name="vendor_id", referencedColumnName="id")
  257.      *  }
  258.      * )
  259.      * @OrderBy({"id" = "DESC"})
  260.      */
  261.     private $vendors;
  262.     /**
  263.      * @var string
  264.      *
  265.      * @Column(name="badges", type="string")
  266.      */
  267.     private $badges = '';
  268.     /**
  269.      * @var bool
  270.      *
  271.      * @Column(name="show_only_discounted", type="boolean")
  272.      */
  273.     private $showOnlyDiscounted = false;
  274.     /**
  275.      * @var bool
  276.      *
  277.      * @Column(name="show_only_flash_sales", type="boolean")
  278.      */
  279.     private $showOnlyFlashSales = false;
  280.     /**
  281.      * @var bool
  282.      *
  283.      * @Column(name="show_only_bazaar", type="boolean", options={"default": 0 })
  284.      */
  285.     private $showOnlyBazaar = false;
  286.     /**
  287.      * @var bool
  288.      *
  289.      * @Column(name="include_bazaar", type="boolean", options={"default": 0 })
  290.      */
  291.     private $includeBazaar = false;
  292.     /**
  293.      * @var ArrayCollection
  294.      *
  295.      * @OneToMany(targetEntity="CategoryPagesPriorityProducts", mappedBy="categoryPage")
  296.      */
  297.     private $priorityProducts;
  298.     /**
  299.      * @var bool
  300.      *
  301.      * @Column(name="show_popular_products", type="boolean", options={"default": 1})
  302.      */
  303.     private $showPopularProducts = true;
  304.     /**
  305.      * @var ArrayCollection
  306.      *
  307.      * @ManyToMany(targetEntity="ProductTag", inversedBy="categoryPages")
  308.      * @JoinTable(name="category_pages_product_tags",
  309.      *  joinColumns={
  310.      *      @JoinColumn(name="category_page_id", referencedColumnName="id", onDelete="CASCADE")
  311.      *  },
  312.      *  inverseJoinColumns={
  313.      *      @JoinColumn(name="product_tag_id", referencedColumnName="id", onDelete="CASCADE")
  314.      *  }
  315.      * )
  316.      * @OrderBy({"id" = "DESC"})
  317.      */
  318.     private $productTags;
  319.     public function __construct()
  320.     {
  321.         parent::__construct();
  322.         $this->productTypes = new ArrayCollection();
  323.         $this->products = new ArrayCollection();
  324.         $this->metas = new ArrayCollection();
  325.         $this->filterAttributes = new ArrayCollection();
  326.         $this->productTags = new ArrayCollection();
  327.     }
  328.     /**
  329.      * @return int
  330.      */
  331.     public function getType()
  332.     {
  333.         return $this->type;
  334.     }
  335.     /**
  336.      * @param int $type
  337.      */
  338.     public function setType($type)
  339.     {
  340.         $this->type = $type;
  341.     }
  342.     /**
  343.      * @return Domain
  344.      */
  345.     public function getDomain()
  346.     {
  347.         return $this->domain;
  348.     }
  349.     /**
  350.      * @param Domain $domain
  351.      */
  352.     public function setDomain($domain)
  353.     {
  354.         $this->domain = $domain;
  355.     }
  356.     public function getLanguage()
  357.     {
  358.         $this->getDomain()->getLanguage()->getCode();
  359.     }
  360.     /**
  361.      * @return CategoryPage|null
  362.      */
  363.     public function getParentCategory()
  364.     {
  365.         return $this->parentCategory;
  366.     }
  367.     /**
  368.      * @param CategoryPage|null $parentCategory
  369.      * 
  370.      * @return void
  371.      */
  372.     public function setParentCategory($parentCategory): void
  373.     {
  374.         $this->parentCategory = $parentCategory;
  375.     }
  376.     /**
  377.      * @return ArrayCollection
  378.      */
  379.     public function getProductTypes()
  380.     {
  381.         return $this->productTypes;
  382.     }
  383.     /**
  384.      * @param ArrayCollection $productTypes
  385.      */
  386.     public function setProductTypes($productTypes)
  387.     {
  388.         $this->productTypes = $productTypes;
  389.     }
  390.     /**
  391.      * Add ProductType
  392.      *
  393.      * @param ProductType $productType
  394.      */
  395.     public function addProductType($productType)
  396.     {
  397.         if (!$this->productTypes->contains($productType)) {
  398.             $this->productTypes->add($productType);
  399.         }
  400.     }
  401.     /**
  402.      * Remove ProductType
  403.      *
  404.      * @param ProductType $productType
  405.      */
  406.     public function removeProductType($productType)
  407.     {
  408.         $this->productTypes->removeElement($productType);
  409.     }
  410.     /**
  411.      * @return ArrayCollection
  412.      */
  413.     public function getProducts()
  414.     {
  415.         return $this->products;
  416.     }
  417.     /**
  418.      * @param ArrayCollection $products
  419.      */
  420.     public function setProducts($products)
  421.     {
  422.         $this->products = $products;
  423.     }
  424.     /**
  425.      * @return ArrayCollection
  426.      */
  427.     public function getSubCategories()
  428.     {
  429.         return $this->subCategories;
  430.     }
  431.     /**
  432.      * Add Product
  433.      *
  434.      * @param Product $product
  435.      */
  436.     public function addProduct($product)
  437.     {
  438.         if (!$this->products->contains($product)) {
  439.             $this->products->add($product);
  440.         }
  441.     }
  442.     /**
  443.      * Remove Product
  444.      *
  445.      * @param Product $product
  446.      */
  447.     public function removeProduct($product)
  448.     {
  449.         $this->products->removeElement($product);
  450.     }
  451.     /**
  452.      * Get Popular Product
  453.      *
  454.      * @return ArrayCollection
  455.      */
  456.     public function getPopularProducts()
  457.     {
  458.         return $this->popularProducts;
  459.     }
  460.     /**
  461.      * Add Popular Product
  462.      *
  463.      * @param Product $product
  464.      */
  465.     public function addPopularProduct(Product $product): void
  466.     {
  467.         if (!$this->popularProducts->contains($product)) {
  468.             $this->popularProducts->add($product);
  469.         }
  470.     }
  471.     /**
  472.      * Remove Popular Product
  473.      *
  474.      * @param Product $product
  475.      */
  476.     public function removePopularProduct(Product $product): void
  477.     {
  478.         $this->popularProducts->removeElement($product);
  479.     }
  480.     /**
  481.      * @return ArrayCollection<int,PageMeta>
  482.      */
  483.     public function getMetas()
  484.     {
  485.         return $this->metas;
  486.     }
  487.     /**
  488.      * @param Language $language
  489.      * @return null|PageMeta
  490.      */
  491.     public function getMetaByLanguage(Language $language)
  492.     {
  493.         foreach ($this->getMetas() as $meta) {
  494.             if ($meta->getLanguage()->getCode() == $language->getCode()) {
  495.                 return $meta;
  496.             }
  497.         }
  498.         return null;
  499.     }
  500.     /**
  501.      * @param string $code
  502.      * @return null|PageMeta
  503.      */
  504.     public function getMetaByCode($code)
  505.     {
  506.         foreach ($this->getMetas() as $meta) {
  507.             if ($meta->getLanguage()->getCode() == $code) {
  508.                 return $meta;
  509.             }
  510.         }
  511.         return null;
  512.     }
  513.     /**
  514.      * @return ArrayCollection
  515.      */
  516.     public function getFilterAttributes()
  517.     {
  518.         return $this->filterAttributes;
  519.     }
  520.     /**
  521.      * @param ArrayCollection $filterAttribute
  522.      */
  523.     public function setFilterAttributes($filterAttribute)
  524.     {
  525.         $this->filterAttributes = $filterAttribute;
  526.     }
  527.     /**
  528.      * Add Filter Attribute
  529.      *
  530.      * @param CategoryPageFilterAttribute $filterAttribute
  531.      */
  532.     public function addFilterAttribute(CategoryPageFilterAttribute $filterAttribute)
  533.     {
  534.         if (!$this->filterAttributes->contains($filterAttribute)) {
  535.             $this->filterAttributes->add($filterAttribute);
  536.         }
  537.     }
  538.     /**
  539.      * Remove Attribute
  540.      *
  541.      * @param Attribute $filterAttribute
  542.      */
  543.     public function removeFilterAttribute($filterAttribute)
  544.     {
  545.         foreach ($this->filterAttributes as $item) {
  546.             if ((int)$filterAttribute->getId() == (int)$item->getAttribute()->getId()) {
  547.                 $this->filterAttributes->removeElement($item);
  548.                 break;
  549.             }
  550.         }
  551.     }
  552.     public function clearFilterAttribute()
  553.     {
  554.         $this->filterAttributes = new ArrayCollection();
  555.     }
  556.     /**
  557.      * @return ArrayCollection
  558.      */
  559.     public function getVendors()
  560.     {
  561.         return $this->vendors;
  562.     }
  563.     /**
  564.      * @param ArrayCollection $vendors
  565.      */
  566.     public function setVendors($vendors)
  567.     {
  568.         $this->vendors = $vendors;
  569.     }
  570.     /**
  571.      * Add Vendor
  572.      *
  573.      * @param Vendor $vendor
  574.      */
  575.     public function addVendor($vendor)
  576.     {
  577.         if (!$this->vendors->contains($vendor)) {
  578.             $this->vendors->add($vendor);
  579.         }
  580.     }
  581.     /**
  582.      * Remove Vendor
  583.      *
  584.      * @param Vendor $vendor
  585.      */
  586.     public function removeVendor($vendor)
  587.     {
  588.         $this->vendors->removeElement($vendor);
  589.     }
  590.     /**
  591.      * @return string
  592.      */
  593.     public function getBadges()
  594.     {
  595.         return $this->badges;
  596.     }
  597.     /**
  598.      * @param string $badges
  599.      */
  600.     public function setBadges($badges)
  601.     {
  602.         $this->badges = $badges;
  603.     }
  604.     /**
  605.      * @return bool
  606.      */
  607.     public function isShowOnlyDiscounted()
  608.     {
  609.         return $this->showOnlyDiscounted;
  610.     }
  611.     /**
  612.      * @param bool $showOnlyDiscounted
  613.      */
  614.     public function setShowOnlyDiscounted($showOnlyDiscounted)
  615.     {
  616.         $this->showOnlyDiscounted = $showOnlyDiscounted;
  617.     }
  618.     /**
  619.      * @return bool
  620.      */
  621.     public function isShowOnlyFlashSales()
  622.     {
  623.         return $this->showOnlyFlashSales;
  624.     }
  625.     /**
  626.      * @param bool $showOnlyFlashSales
  627.      */
  628.     public function setShowOnlyFlashSales($showOnlyFlashSales)
  629.     {
  630.         $this->showOnlyFlashSales = $showOnlyFlashSales;
  631.     }
  632.     /**
  633.      * @return bool
  634.      */
  635.     public function isShowOnlyBazaar(): bool
  636.     {
  637.         return $this->showOnlyBazaar;
  638.     }
  639.     /**
  640.      * @param bool $showOnlyBazaar
  641.      */
  642.     public function setShowOnlyBazaar(bool $showOnlyBazaar): void
  643.     {
  644.         $this->showOnlyBazaar = $showOnlyBazaar;
  645.     }
  646.     /**
  647.      * @return bool
  648.      */
  649.     public function isIncludeBazaar(): bool
  650.     {
  651.         return $this->includeBazaar;
  652.     }
  653.     /**
  654.      * @param bool $includeBazaar
  655.      */
  656.     public function setIncludeBazaar(bool $includeBazaar): void
  657.     {
  658.         $this->includeBazaar = $includeBazaar;
  659.     }
  660.     /**
  661.      * @return ArrayCollection
  662.      */
  663.     public function getPriorityProducts()
  664.     {
  665.         return $this->priorityProducts;
  666.     }
  667.     /**
  668.      * @return bool
  669.      */
  670.     public function isShowPopularProducts(): bool
  671.     {
  672.         return $this->showPopularProducts;
  673.     }
  674.     /**
  675.      * @param bool $showPopularProducts
  676.      * @return void
  677.      */
  678.     public function setShowPopularProducts(bool $showPopularProducts): void
  679.     {
  680.         $this->showPopularProducts = $showPopularProducts;
  681.     }
  682.     /**
  683.      * @return ArrayCollection
  684.      */
  685.     public function getProductTags()
  686.     {
  687.         return $this->productTags;
  688.     }
  689.     /**
  690.      * Add ProductTag
  691.      *
  692.      * @param ProductTag $productTag
  693.      */
  694.     public function addProductTag(ProductTag $productTag): void
  695.     {
  696.         if (!$this->productTags->contains($productTag)) {
  697.             $this->productTags->add($productTag);
  698.         }
  699.     }
  700.     /**
  701.      * Remove ProductTag
  702.      *
  703.      * @param ProductTag $productTag
  704.      */
  705.     public function removeProductTag(ProductTag $productTag): void
  706.     {
  707.         $this->productTags->removeElement($productTag);
  708.     }
  709. }