<?phpnamespace App\AtechNet\CoreBundle\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\ORM\Mapping\Column;use Doctrine\ORM\Mapping\Entity;use Doctrine\ORM\Mapping\HasLifecycleCallbacks;use Doctrine\ORM\Mapping\JoinColumn;use Doctrine\ORM\Mapping\ManyToOne;use Doctrine\ORM\Mapping\OneToMany;use Doctrine\ORM\Mapping\Table;/** * ProductGroup * * @Table(name="product_group") * @Entity * @HasLifecycleCallbacks */class ProductGroup extends AbstractSignedEntity{ /** * @var Domain * * @ManyToOne(targetEntity="Domain") * @JoinColumn(name="domain_id", referencedColumnName="id") */ private $domain; /** * @var string * * @Column(name="title", type="string", length=64) */ private $title; /** * @var int * * @Column(name="products_to_display", type="integer") */ private $productsToDisplay; /** * @var bool * * @Column(name="only_flash_sales", type="boolean") */ private $onlyFlashSales = false; /** * @var ArrayCollection * * @OneToMany(targetEntity="ProductGroupMember", mappedBy="group", orphanRemoval=true) **/ private $members; /** * @var bool * * @Column(name="show_random", type="boolean") */ private $showRandom = false; /** * @return Domain */ public function getDomain() { return $this->domain; } /** * @param Domain $domain */ public function setDomain($domain) { $this->domain = $domain; } /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $title */ public function setTitle($title) { $this->title = $title; } /** * @return int */ public function getProductsToDisplay() { return $this->productsToDisplay; } /** * @param int $productsToDisplay */ public function setProductsToDisplay($productsToDisplay) { $this->productsToDisplay = $productsToDisplay; } /** * @return bool */ public function isOnlyFlashSales() { return $this->onlyFlashSales; } /** * @param bool $onlyFlashSales */ public function setOnlyFlashSales($onlyFlashSales) { $this->onlyFlashSales = $onlyFlashSales; } /** * @return ArrayCollection */ public function getMembers() { return $this->members; } /** * @param ArrayCollection $members */ public function setMembers($members) { $this->members = $members; } /** * @return void */ public function removeAllMember(): void { $this->members->clear(); } /** * @return bool */ public function getShowRandom(): bool { return $this->showRandom; } /** * @param bool $showRandom * @return void */ public function setShowRandom(bool $showRandom): void { $this->showRandom = $showRandom; }}