src/AtechNet/CoreBundle/Entity/DomainNavigation.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping\Column;
  6. use Doctrine\ORM\Mapping\Entity;
  7. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  8. use Doctrine\ORM\Mapping\JoinColumn;
  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. use Symfony\Component\Validator\Constraints as Assert;
  14. /**
  15.  * DomainNavigation
  16.  *
  17.  * @Table(name="domain_navigation")
  18.  * @Entity()
  19.  * @HasLifecycleCallbacks
  20.  */
  21. class DomainNavigation extends AbstractSignedEntity
  22. {
  23.     public const LABEL_NONE = 0;
  24.     public const LABEL_NEW = 1;
  25.     public const ICON_LAPTOP = 1;       // 56,
  26.     public const ICON_COMPUTER = 2;     // 48,
  27.     public const ICON_DESKTOP = 3;      // 78,
  28.     public const ICON_MOBILE = 4;
  29.     public const ICON_TABLET = 5;
  30.     public const ICON_WATCH = 6;
  31.     public const ICON_MICROCHIP = 7;    // 44,
  32.     public const ICON_KEYBOARD = 8;
  33.     public const ICON_STAR = 9;
  34.     public const ICON_APPLE = 10;
  35.     public const ICON_BAG = 11;
  36.     public const ICON_TAG = 12;
  37.     public const ICON_PERCENT = 13;
  38.     public const ICON_BAZAAR = 14;
  39.     public const NAVIGATION_TYPE_ITEM = 1;
  40.     public const NAVIGATION_TYPE_GROUP = 2;
  41.     public const NAVIGATION_TYPE_PRODUCT = 3;
  42.     public const NAVIGATION_TYPE_STANDARD = 4;
  43.     public const NAVIGATION_TYPE_PUSH = 5;
  44.     /**
  45.      * @return array<int,string>
  46.      */
  47.     public static function getLabelChoices(): array
  48.     {
  49.         return [
  50.             self::LABEL_NONE => 'None',
  51.             self::LABEL_NEW => 'New',
  52.         ];
  53.     }
  54.     /**
  55.      * @return array<int,string>
  56.      */
  57.     public static function getIconChoices(): array
  58.     {
  59.         return [
  60.             self::ICON_LAPTOP => 'Laptop',
  61.             self::ICON_COMPUTER => 'Computer',
  62.             self::ICON_DESKTOP => 'Desktop',
  63.             self::ICON_MOBILE => 'Mobile',
  64.             self::ICON_TABLET => 'Tablet',
  65.             self::ICON_WATCH => 'Watch',
  66.             self::ICON_MICROCHIP => 'Microchip',
  67.             self::ICON_KEYBOARD => 'Keyboard',
  68.             self::ICON_STAR => 'Star',
  69.             self::ICON_APPLE => 'Apple',
  70.             self::ICON_BAG => 'Bag',
  71.             self::ICON_TAG => 'Tag',
  72.             self::ICON_PERCENT => 'Percent',
  73.         ];
  74.     }
  75.     /**
  76.      * @var Domain
  77.      *
  78.      * @ManyToOne(targetEntity="Domain")
  79.      * @JoinColumn(name="domain_id", referencedColumnName="id")
  80.      */
  81.     private $domain; // , inversedBy="navigation"
  82.     /**
  83.      * @var DomainNavigation|null
  84.      *
  85.      * @ManyToOne(targetEntity="DomainNavigation", inversedBy="children")
  86.      * @JoinColumn(name="parent_id", referencedColumnName="id", nullable=true)
  87.      */
  88.     private $parent;
  89.     /**
  90.      * @var Collection<int,DomainNavigation>
  91.      *
  92.      * @OneToMany(targetEntity="DomainNavigation", mappedBy="parent")
  93.      * @OrderBy({ "sortIndex" = "ASC" })
  94.      */
  95.     private $children;
  96.     /**
  97.      * @var int
  98.      *
  99.      * @Assert\NotNull
  100.      *
  101.      * @Column(name="type", type="smallint")
  102.      */
  103.     private $type = self::NAVIGATION_TYPE_ITEM;
  104.     /**
  105.      * @var string
  106.      *
  107.      * @Assert\NotNull
  108.      *
  109.      * @Column(name="title", type="text", length=60)
  110.      */
  111.     private $title;
  112.     /**
  113.      * @var string|null
  114.      *
  115.      * @Column(name="sub_title", type="text", length=60, nullable=true)
  116.      */
  117.     private $subTitle = null;
  118.     /**
  119.      * @var int|null
  120.      *
  121.      * @Column(name="icon", type="smallint", nullable=true)
  122.      */
  123.     private $icon;
  124.     /**
  125.      * @var CategoryPage|null
  126.      *
  127.      * @ManyToOne(targetEntity="CategoryPage")
  128.      * @JoinColumn(name="category_page_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
  129.      */
  130.     private $categoryPage;
  131.     /**
  132.      * @var string|null
  133.      *
  134.      * @Column(name="route", type="text", length=255, nullable=true)
  135.      */
  136.     private $route;
  137.     /**
  138.      * @var string|null
  139.      *
  140.      * @Column(name="query", type="text", length=255, nullable=true)
  141.      */
  142.     private $query;
  143.     /**
  144.      * @var bool
  145.      *
  146.      * @Column(name="mobile", type="boolean")
  147.      */
  148.     private $mobile = true;
  149.     /**
  150.      * @var bool
  151.      *
  152.      * @Column(name="desktop", type="boolean")
  153.      */
  154.     private $desktop = true;
  155.     /**
  156.      * @var int|null
  157.      *
  158.      * @Column(name="label_id", type="integer", nullable=true)
  159.      */
  160.     private $label;
  161.     /**
  162.      * @var int
  163.      *
  164.      * @Assert\NotNull
  165.      *
  166.      * @Column(name="sort_index", type="integer")
  167.      */
  168.     private $sortIndex = -1;
  169.     /**
  170.      * @var Collection<int,Nanobar>
  171.      *
  172.      * @OneToMany(targetEntity="Nanobar", mappedBy="domainNavigation")
  173.      **/
  174.     private $nanobars;
  175.     /**
  176.      * @var bool
  177.      *
  178.      * @Column(name="bazaar", type="boolean")
  179.      */
  180.     private $bazaar = false;
  181.     /**
  182.      * Construct
  183.      */
  184.     public function __construct()
  185.     {
  186.         parent::__construct();
  187.         $this->children = new ArrayCollection();
  188.         $this->bazaar = false;
  189.     }
  190.     /**
  191.      * @return Domain
  192.      */
  193.     public function getDomain(): Domain
  194.     {
  195.         return $this->domain;
  196.     }
  197.     /**
  198.      * @param Domain $domain
  199.      */
  200.     public function setDomain(Domain $domain): void
  201.     {
  202.         $this->domain = $domain;
  203.     }
  204.     /**
  205.      * @return DomainNavigation|null
  206.      */
  207.     public function getParent(): ?DomainNavigation
  208.     {
  209.         return $this->parent;
  210.     }
  211.     /**
  212.      * @param DomainNavigation|null $domainNavigation
  213.      */
  214.     public function setParent(?DomainNavigation $domainNavigation): void
  215.     {
  216.         $this->parent = $domainNavigation;
  217.     }
  218.     /**
  219.      * @return Collection<int,DomainNavigation>
  220.      */
  221.     public function getChildren(): Collection
  222.     {
  223.         return $this->children;
  224.     }
  225.     /**
  226.      * @return int
  227.      */
  228.     public function getType(): int
  229.     {
  230.         return $this->type;
  231.     }
  232.     /**
  233.      * @param int $type
  234.      */
  235.     public function setType(int $type): void
  236.     {
  237.         $this->type = $type;
  238.     }
  239.     /**
  240.      * @return bool
  241.      */
  242.     public function isGroup(): bool
  243.     {
  244.         return $this->type === self::NAVIGATION_TYPE_GROUP;
  245.     }
  246.     /**
  247.      * @return string
  248.      */
  249.     public function getTitle(): string
  250.     {
  251.         return $this->title;
  252.     }
  253.     /**
  254.      * @param string $title
  255.      */
  256.     public function setTitle(string $title): void
  257.     {
  258.         $this->title = $title;
  259.     }
  260.     /**
  261.      * @return string|null
  262.      */
  263.     public function getSubTitle(): ?string
  264.     {
  265.         return $this->subTitle;
  266.     }
  267.     /**
  268.      * @param string|null $subTitle
  269.      */
  270.     public function setSubTitle(?string $subTitle): void
  271.     {
  272.         $this->subTitle = $subTitle;
  273.     }
  274.     /**
  275.      * @return ?int
  276.      */
  277.     public function getIcon(): ?int
  278.     {
  279.         return $this->icon;
  280.     }
  281.     /**
  282.      * @param int|null $icon
  283.      */
  284.     public function setIcon(?int $icon): void
  285.     {
  286.         $this->icon = $icon;
  287.     }
  288.     /**
  289.      * @return string|null
  290.      */
  291.     public function getSvgIcon(): ?string
  292.     {
  293.         if (!empty(self::getIcons()[$this->icon])) {
  294.             return self::getIcons()[$this->icon];
  295.         }
  296.         return null;
  297.     }
  298.     /**
  299.      * @return CategoryPage|null
  300.      */
  301.     public function getCategoryPage(): ?CategoryPage
  302.     {
  303.         return $this->categoryPage;
  304.     }
  305.     /**
  306.      * @param CategoryPage|null $categoryPage
  307.      */
  308.     public function setCategoryPage(?CategoryPage $categoryPage): void
  309.     {
  310.         $this->categoryPage = $categoryPage;
  311.     }
  312.     /**
  313.      * @return string
  314.      */
  315.     public function getRoute(): string
  316.     {
  317.         if ( !is_null($this->route) ) {
  318.             return $this->route;
  319.         }
  320.         $route = '';
  321.         if ( is_null($this->getCategoryPage()) ) {
  322.             return $route;
  323.         }
  324.         $languageId = $this->getDomain()->getLanguage()->getId();
  325.         $categoryPage = $this->getCategoryPage();
  326.         if ( !is_null($categoryPage->getParentCategory()) ) {
  327.             foreach ( $categoryPage->getParentCategory()->getMetas() as $meta ) {
  328.                 if ( $meta->getLanguage()->getId() == $languageId ) {
  329.                     $route .= $meta->getTitle() . ' > ';
  330.                     break;
  331.                 }
  332.             }
  333.         }
  334.         foreach ( $categoryPage->getMetas() as $meta ) {
  335.             if ( $meta->getLanguage()->getId() == $languageId ) {
  336.                 $route .= $meta->getTitle();
  337.                 break;
  338.             }
  339.         }
  340.         return trim($route);
  341.     }
  342.     /**
  343.      * @param string|null $route
  344.      */
  345.     public function setRoute(?string $route): void
  346.     {
  347.         $this->route = $route;
  348.     }
  349.     /**
  350.      * @return string|null
  351.      */
  352.     public function getQuery(): ?string
  353.     {
  354.         return $this->query;
  355.     }
  356.     /**
  357.      * @param string|null $query
  358.      */
  359.     public function setQuery(?string $query): void
  360.     {
  361.         $this->query = $query;
  362.     }
  363.     /**
  364.      * @return bool
  365.      */
  366.     public function isMobile(): bool
  367.     {
  368.         return $this->mobile;
  369.     }
  370.     /**
  371.      * @param bool $mobile
  372.      */
  373.     public function setMobile(bool $mobile): void
  374.     {
  375.         $this->mobile = $mobile;
  376.     }
  377.     /**
  378.      * @return bool
  379.      */
  380.     public function isDesktop(): bool
  381.     {
  382.         return $this->desktop;
  383.     }
  384.     /**
  385.      * @param bool $desktop
  386.      */
  387.     public function setDesktop(bool $desktop): void
  388.     {
  389.         $this->desktop = $desktop;
  390.     }
  391.     /**
  392.      * @return int|null
  393.      */
  394.     public function getLabel(): ?int
  395.     {
  396.         return $this->label;
  397.     }
  398.     /**
  399.      * @param int|null $label
  400.      */
  401.     public function setLabel(?int $label): void
  402.     {
  403.         $this->label = $label;
  404.     }
  405.     /**
  406.      * @return int
  407.      */
  408.     public function getSortIndex(): int
  409.     {
  410.         return $this->sortIndex;
  411.     }
  412.     /**
  413.      * @param int $sortIndex
  414.      */
  415.     public function setSortIndex(int $sortIndex): void
  416.     {
  417.         $this->sortIndex = $sortIndex;
  418.     }
  419.     /**
  420.      * @return string
  421.      */
  422.     public function getLink(): string
  423.     {
  424.         if ( !is_null($this->route) ) {
  425.             return $this->route;
  426.         }
  427.         $link = '';
  428.         if ( is_null($this->getCategoryPage()) ) {
  429.             return $link;
  430.         }
  431.         $languageId = $this->getDomain()->getLanguage()->getId();
  432.         $categoryPage = $this->getCategoryPage();
  433.         if ( !is_null($categoryPage->getParentCategory()) ) {
  434.             foreach ( $categoryPage->getParentCategory()->getMetas() as $meta ) {
  435.                 if ( $meta->getLanguage()->getId() == $languageId ) {
  436.                     $link .= $meta->getLink() . '/';
  437.                     break;
  438.                 }
  439.             }
  440.         }
  441.         foreach ( $categoryPage->getMetas() as $meta ) {
  442.             if ( $meta->getLanguage()->getId() == $languageId ) {
  443.                 $link .= $meta->getLink();
  444.                 break;
  445.             }
  446.         }
  447.         return trim($link);
  448.     }
  449.     /**
  450.      * @return array<int,string>
  451.      */
  452.     public static function getIcons(): array
  453.     {
  454.         return [
  455.             self::ICON_LAPTOP => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M128 32C92.7 32 64 60.7 64 96V352h64V96H512V352h64V96c0-35.3-28.7-64-64-64H128zM19.2 384C8.6 384 0 392.6 0 403.2C0 445.6 34.4 480 76.8 480H563.2c42.4 0 76.8-34.4 76.8-76.8c0-10.6-8.6-19.2-19.2-19.2H19.2z"/></svg>',
  456.             self::ICON_COMPUTER => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M384 96V320H64L64 96H384zM64 32C28.7 32 0 60.7 0 96V320c0 35.3 28.7 64 64 64H181.3l-10.7 32H96c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H277.3l-10.7-32H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm464 0c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h64c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H528zm16 64h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H544c-8.8 0-16-7.2-16-16s7.2-16 16-16zm-16 80c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H544c-8.8 0-16-7.2-16-16zm32 160a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>',
  457.             self::ICON_DESKTOP => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"/></svg>',
  458.             self::ICON_MOBILE => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M16 64C16 28.7 44.7 0 80 0H304c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64V64zM224 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM304 64H80V384H304V64z"/></svg>',
  459.             self::ICON_TABLET => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 64C0 28.7 28.7 0 64 0H384c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM256 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM384 64H64V384H384V64z"/></svg>',
  460.             self::ICON_WATCH => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M112.3 0C85.6 0 64 21.6 64 48.3V65.6C27.5 73 0 105.3 0 144V368c0 38.7 27.5 71 64 78.4V464c0 26.5 21.5 48 48 48H272c26.5 0 48-21.5 48-48V446.4c36.5-7.4 64-39.7 64-78.4V144c0-38.7-27.5-71-64-78.4V48.3C320 21.6 298.4 0 271.7 0H112.3zM304 112c17.7 0 32 14.3 32 32V368c0 17.7-14.3 32-32 32H80c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32H304zM192 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm64 40a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM152 352a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM256 184a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM152 208a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm-8 48a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm120 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>',
  461.             self::ICON_MICROCHIP => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64c-35.3 0-64 28.7-64 64H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64v56H24c-13.3 0-24 10.7-24 24s10.7 24 24 24H64c0 35.3 28.7 64 64 64v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448h56v40c0 13.3 10.7 24 24 24s24-10.7 24-24V448c35.3 0 64-28.7 64-64h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V280h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448V176h40c13.3 0 24-10.7 24-24s-10.7-24-24-24H448c0-35.3-28.7-64-64-64V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H280V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H176V24zM160 128H352c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32zm192 32H160V352H352V160z"/></svg>',
  462.             self::ICON_KEYBOARD => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M64 64C28.7 64 0 92.7 0 128V384c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64zm16 64h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16zM64 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V240zm16 80h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V336c0-8.8 7.2-16 16-16zm80-176c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V144zm16 80h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V240c0-8.8 7.2-16 16-16zM160 336c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V336zM272 128h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16zM256 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V240zM368 128h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16zM352 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16V240zM464 128h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H464c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16zM448 240c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H464c-8.8 0-16-7.2-16-16V240zm16 80h32c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H464c-8.8 0-16-7.2-16-16V336c0-8.8 7.2-16 16-16z"/></svg>',
  463.             self::ICON_STAR => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.6 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"/></svg>',
  464.             self::ICON_APPLE => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"/></svg>',
  465.             self::ICON_BAG => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M160 112c0-35.3 28.7-64 64-64s64 28.7 64 64v48H160V112zm-48 48H48c-26.5 0-48 21.5-48 48V416c0 53 43 96 96 96H352c53 0 96-43 96-96V208c0-26.5-21.5-48-48-48H336V112C336 50.1 285.9 0 224 0S112 50.1 112 112v48zm24 48a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm152 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"/></svg>',
  466.             self::ICON_TAG => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>',
  467.             self::ICON_PERCENT => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><rect width="16" height="16" fill="#fff" rx="4.571"/><path fill="#73AF1D" fill-rule="evenodd" d="M6.977 6.53c0 .811-.189 1.44-.566 1.884-.378.444-.915.667-1.612.667-.656 0-1.175-.23-1.558-.69-.383-.459-.574-1.08-.574-1.862 0-.811.186-1.436.56-1.873C3.6 4.219 4.124 4 4.799 4c.667 0 1.196.227 1.589.68.392.455.589 1.07.589 1.85Zm-2.59.021c0 .425.036.731.109.92.072.187.18.281.326.281.144 0 .252-.092.323-.276.07-.185.105-.493.105-.925 0-.424-.035-.73-.105-.918-.071-.188-.179-.283-.323-.283-.15 0-.259.096-.33.288-.07.192-.105.496-.105.913Zm2.12 5.657 4.637-8.092H9.446L4.81 12.208h1.698Zm4.237-2.435c0 .424.036.73.108.918.073.188.181.282.326.282.164 0 .277-.107.34-.323.063-.216.095-.508.095-.877 0-.37-.032-.662-.095-.878-.063-.216-.176-.323-.34-.323-.149 0-.258.095-.329.287-.07.192-.105.497-.105.914Zm2.02 1.856c.38-.444.57-1.07.57-1.879 0-.778-.197-1.394-.59-1.848-.392-.454-.922-.68-1.589-.68-.674 0-1.198.218-1.572.655-.373.437-.56 1.062-.56 1.873 0 .779.192 1.398.575 1.857.383.46.902.69 1.557.69.694 0 1.23-.223 1.61-.668Z" clip-rule="evenodd"/></svg>',
  468.             self::ICON_BAZAAR => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M197.2 406.7C203.8 402.3 211.5 400 219.4 400L352 400C360.8 400 368 407.2 368 416C368 424.8 360.8 432 352 432L288 432C274.7 432 264 442.7 264 456C264 469.3 274.7 480 288 480L432 480C436.8 480 441.6 478.5 445.6 475.8L521.6 423.7C532.3 416.4 547 419.6 553.6 430.7C559.7 440.9 556.8 454.2 547 460.9L466.9 515.5C454.9 523.7 440.8 528 426.3 528L56 528C42.7 528 32 538.7 32 552C32 565.3 42.7 576 56 576L426.4 576C450.5 576 474.1 568.7 494 555.1L574.1 500.5C605 479.5 614.1 438 594.8 406C573.9 371.2 528 361.2 494.5 384.1L424.6 432L414 432C415.3 426.9 416 421.5 416 416C416 380.7 387.3 352 352 352L219.4 352C202 352 185 357.1 170.6 366.8L96.7 416L56 416C42.7 416 32 426.7 32 440C32 453.3 42.7 464 56 464L104 464C108.7 464 113.4 462.6 117.3 460L197.2 406.7zM442.8 233.3C436.2 237.7 428.5 240 420.6 240L288 240C279.2 240 272 232.8 272 224C272 215.2 279.2 208 288 208L352 208C365.3 208 376 197.3 376 184C376 170.7 365.3 160 352 160L208 160C203.2 160 198.4 161.5 194.4 164.2L118.4 216.3C107.7 223.6 93 220.4 86.4 209.3C80.3 199.1 83.2 185.8 93 179.1L173.1 124.5C185 116.4 199.1 112 213.6 112L584 112C597.3 112 608 101.3 608 88C608 74.7 597.3 64 584 64L213.6 64C189.5 64 165.9 71.3 146 84.9L65.9 139.4C35.1 160.5 26 202 45.2 234C66.1 268.8 112 278.8 145.5 255.9L215.4 208L226 208C224.7 213.1 224 218.5 224 224C224 259.3 252.7 288 288 288L420.6 288C438 288 455 282.9 469.4 273.2L543.2 224L583.9 224C597.2 224 607.9 213.3 607.9 200C607.9 186.7 597.2 176 583.9 176L535.9 176C531.2 176 526.5 177.4 522.6 180L442.7 233.3z"/></svg>'
  469.         ];
  470.     }
  471.     /**
  472.      * @return bool
  473.      */
  474.     public function isBazaar(): bool
  475.     {
  476.         return $this->bazaar;
  477.     }
  478.     /**
  479.      * @param bool $bazaar
  480.      */
  481.     public function setBazaar(bool $bazaar): void
  482.     {
  483.         $this->bazaar = $bazaar;
  484.     }
  485.     /**
  486.      * @param Collection<int,Nanobar> $nanobars
  487.      */
  488.     public function setNanobars($nanobars): void
  489.     {
  490.         $this->nanobars = $nanobars;
  491.     }
  492.     /**
  493.      * @return Collection<int,Nanobar>
  494.      */
  495.     public function getNanobars(): Collection
  496.     {
  497.         return $this->nanobars;
  498.     }
  499. }