src/Entity/Webfactory/Widget/WidgetAbstract.php line 42

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Webfactory\Widget;
  3. use App\Entity\Adherent\Magasin;
  4. use App\Repository\Webfactory\Widget\WidgetAbstractRepository;
  5. use App\Entity\Webfactory\PageAbstractWidgetAbstract;
  6. use App\Entity\Webfactory\Page\PageWidgetsList;
  7. use App\Entity\Webfactory\WebfactoryCustomPage;
  8. use App\Entity\Webfactory\WebfactoryPage;
  9. use App\Entity\Webfactory\WebfactoryTheme;
  10. use App\Entity\Webfactory\WebfactoryWidget;
  11. use Doctrine\ORM\Mapping as ORM;
  12. #[ORM\Entity(repositoryClassWidgetAbstractRepository::class)]
  13. #[ORM\InheritanceType('JOINED')]
  14. #[ORM\DiscriminatorColumn(name'discr'type'string')]
  15. #[ORM\DiscriminatorMap([
  16.     'GeneralWidget' => \App\Entity\Webfactory\Widget\GeneralWidget::class,
  17.     'EquipesClassique' => \App\Entity\Webfactory\Widget\Classique\Teams::class,
  18.     'EquipesCreateur' => \App\Entity\Webfactory\Widget\Createur\Teams::class,
  19.     'VerbatimClassique' => \App\Entity\Webfactory\Widget\Classique\Verbatim::class,
  20.     'VerbatimCreateur' => \App\Entity\Webfactory\Widget\Createur\Verbatim::class,
  21.     'StorePresentationClassique' => \App\Entity\Webfactory\Widget\Classique\Store_presentation::class,
  22.     'StorePresentationCreateur' => \App\Entity\Webfactory\Widget\Createur\Store_presentation::class,
  23.     'PromoteClassique' => \App\Entity\Webfactory\Widget\Classique\Promote::class,
  24.     'PromoteCreateur' => \App\Entity\Webfactory\Widget\Createur\Promote::class,
  25.     'MoreAboutClassique' => \App\Entity\Webfactory\Widget\Classique\More_about::class,
  26.     'MoreAboutCreateur' => \App\Entity\Webfactory\Widget\Createur\More_about::class,
  27.     'GalleryClassique' => \App\Entity\Webfactory\Widget\Classique\Gallery::class,
  28.     'GalleryCreateur' => \App\Entity\Webfactory\Widget\Createur\Gallery::class,
  29.     'BrandsClassique' => \App\Entity\Webfactory\Widget\Classique\Brands::class,
  30.     'BrandsCreateur' => \App\Entity\Webfactory\Widget\Createur\Brands::class,
  31.     'Services_specialities' => \App\Entity\Webfactory\Widget\WidgetServiceSpecialities::class,
  32.     'CustomTextClassique' => \App\Entity\Webfactory\Widget\Classique\Custom_text::class,
  33.     'CustomTextCreateur' => \App\Entity\Webfactory\Widget\Createur\Custom_text::class,
  34.     'faqCreateur' => \App\Entity\Webfactory\Widget\Createur\Faq::class,
  35.     'FaqClassique' => \App\Entity\Webfactory\Widget\Classique\Faq::class,
  36.     'NotificationClassique' => \App\Entity\Webfactory\Widget\Classique\Notification::class,
  37.     'NotificationCreateur' => \App\Entity\Webfactory\Widget\Createur\Notification::class])
  38. ]
  39. abstract class WidgetAbstract
  40. {
  41.     #[ORM\Id]
  42.     #[ORM\GeneratedValue]
  43.     #[ORM\Column(type'integer')]
  44.     private $id;
  45.     #[ORM\ManyToOne(targetEntityMagasin::class, inversedBy'widgetAbstracts')]
  46.     #[ORM\JoinColumn(name'magasin'referencedColumnName'k_adherent'nullablefalse)]
  47.     private $magasin;
  48.     #[ORM\ManyToOne(targetEntityWebfactoryWidget::class, inversedBy'widgetAbstracts')]
  49.     #[ORM\JoinColumn(name'widget_id'referencedColumnName'identifier')]
  50.     private $widget;
  51.     #[ORM\Column(type'string'nullablefalse)]
  52.     private $theme;
  53.     #[ORM\Column(type'text')]
  54.     private $lang;
  55.     #[ORM\ManyToOne(targetEntityWebfactoryPage::class, inversedBy'widgetAbstracts')]
  56.     #[ORM\JoinColumn(name'page_id'referencedColumnName'identifier')]
  57.     private $page;
  58.     #[ORM\ManyToOne(targetEntityWebfactoryCustomPage::class, inversedBy'widgetAbstracts')]
  59.     private $pageCustom;
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getMagasin(): ?Magasin
  65.     {
  66.         return $this->magasin;
  67.     }
  68.     public function setMagasin(?Magasin $magasin): self
  69.     {
  70.         $this->magasin $magasin;
  71.         return $this;
  72.     }
  73.     public function getWidget(): ?WebfactoryWidget
  74.     {
  75.         return $this->widget;
  76.     }
  77.     public function setWidget(?WebfactoryWidget $widget): self
  78.     {
  79.         $this->widget $widget;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return mixed
  84.      */
  85.     public function getTheme()
  86.     {
  87.         return $this->theme;
  88.     }
  89.     public function setTheme(mixed $theme): void
  90.     {
  91.         $this->theme $theme;
  92.     }
  93.     /**
  94.      * @return mixed
  95.      */
  96.     public function getLang()
  97.     {
  98.         return $this->lang;
  99.     }
  100.     public function setLang(mixed $lang): void
  101.     {
  102.         $this->lang $lang;
  103.     }
  104.     public function getPage(): ?WebfactoryPage
  105.     {
  106.         return $this->page;
  107.     }
  108.     public function setPage(?WebfactoryPage $page): self
  109.     {
  110.         $this->page $page;
  111.         return $this;
  112.     }
  113.     public function getPageCustom(): ?WebfactoryCustomPage
  114.     {
  115.         return $this->pageCustom;
  116.     }
  117.     public function setPageCustom(?WebfactoryCustomPage $pageCustom): self
  118.     {
  119.         $this->pageCustom $pageCustom;
  120.         return $this;
  121.     }
  122.     public function setId($id): self
  123.     {
  124.         $this->id $id;
  125.         return $this;
  126.     }
  127. }