src/Entity/WebPageBlock.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity (repositoryClass="App\Repository\WebPageBlockRepository")
  6.  */
  7. #[ApiResource(order: ['ordering'])]
  8. class WebPageBlock
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity="App\Entity\WebPage", inversedBy="blocks")
  18.      * @ORM\JoinColumns({
  19.      *   @ORM\JoinColumn(name="web_page_id", referencedColumnName="id", onDelete="CASCADE")
  20.      * })
  21.      */
  22.     private $webPage;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Block", inversedBy="webPages", cascade={"persist"})
  25.      * @ORM\JoinColumns({
  26.      *   @ORM\JoinColumn(name="block_id", referencedColumnName="id")
  27.      * })
  28.      */
  29.     private $block;
  30.     /**
  31.      * @ORM\Column(type="string", nullable=true, length=100, options={"comment":"Code de position prédéfini (texte) (ex : TITRE, COORDONNEES, PERSO, ...)"})
  32.      *
  33.      */
  34.     private $position;
  35.     /**
  36.      * @ORM\Column(type="integer", nullable=true, options={"comment":"Position des blocks PERSO"})
  37.      *
  38.      */
  39.     private $ordering;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="webPageBlocks")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
  44.      * })
  45.      */
  46.     private $owner;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="webPageBlocks")
  49.      * @ORM\JoinColumns({
  50.      *   @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
  51.      * })
  52.      */
  53.     private $entity;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $createdAt;
  58.     /**
  59.      * @ORM\Column(type="datetime", nullable=true)
  60.      */
  61.     private $updatedAt;
  62.     /**
  63.      * @ORM\Column(type="string", length=100, nullable=true)
  64.      */
  65.     private $blockSpecialType;
  66.     /**
  67.      * @ORM\Column(type="string", length=100, nullable=true)
  68.      */
  69.     private $blockLabel;
  70.     /**
  71.      * @ORM\Column(type="json", nullable=true)
  72.      */
  73.     private $blockLabelTranslations;
  74.     /**
  75.      * @ORM\Column(type="string", length=100, nullable=true)
  76.      */
  77.     private $blockIcon;
  78.     /**
  79.      * @ORM\Column(type="json", nullable=true)
  80.      */
  81.     private $blockColumns;
  82.     /**
  83.      * @ORM\Column(type="json", nullable=true)
  84.      */
  85.     private $blockWidth;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $CSSClass;
  90.     /**
  91.      * @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"code de statut : 0=OK"})
  92.      */
  93.     private $state;
  94.     /**
  95.      * @ORM\Column(type="json", nullable=true)
  96.      */
  97.     private $parameters;
  98.     /**
  99.      * @ORM\ManyToOne(targetEntity="App\Entity\BridgeComponent", inversedBy="webPageBlocks", cascade={"persist"})
  100.      * @ORM\JoinColumns({
  101.      *   @ORM\JoinColumn(name="bridge_component_id", referencedColumnName="id")
  102.      * })
  103.      */
  104.     private $bridgeComponent;
  105.     /**
  106.      * @ORM\ManyToOne(targetEntity="App\Entity\WebPageBlockGroup", inversedBy="blocks", cascade={"persist"})
  107.      * @ORM\JoinColumns({
  108.      *   @ORM\JoinColumn(name="group_id", referencedColumnName="id")
  109.      * })
  110.      */
  111.     private $wpGroup;
  112.     /**
  113.      * @ORM\Column(type="json", nullable=true, options={"comment":"Options de visibilité"})
  114.      */
  115.     private $visibilityOptions;
  116.     public function getId() : ?int
  117.     {
  118.         return $this->id;
  119.     }
  120.     public function getPosition() : ?string
  121.     {
  122.         return $this->position;
  123.     }
  124.     public function setPosition(?string $position) : self
  125.     {
  126.         $this->position $position;
  127.         return $this;
  128.     }
  129.     public function getOrdering() : ?int
  130.     {
  131.         return $this->ordering;
  132.     }
  133.     public function setOrdering(?int $ordering) : self
  134.     {
  135.         $this->ordering $ordering;
  136.         return $this;
  137.     }
  138.     public function getCSSClass() : ?string
  139.     {
  140.         return $this->CSSClass;
  141.     }
  142.     public function setCSSClass(?string $CSSClass) : self
  143.     {
  144.         $this->CSSClass $CSSClass;
  145.         return $this;
  146.     }
  147.     public function getCreatedAt() : ?\DateTimeInterface
  148.     {
  149.         return $this->createdAt;
  150.     }
  151.     public function setCreatedAt(?\DateTimeInterface $createdAt) : self
  152.     {
  153.         $this->createdAt $createdAt;
  154.         return $this;
  155.     }
  156.     public function getUpdatedAt() : ?\DateTimeInterface
  157.     {
  158.         return $this->updatedAt;
  159.     }
  160.     public function setUpdatedAt(?\DateTimeInterface $updatedAt) : self
  161.     {
  162.         $this->updatedAt $updatedAt;
  163.         return $this;
  164.     }
  165.     public function getBlockLabel() : ?string
  166.     {
  167.         return $this->blockLabel;
  168.     }
  169.     public function setBlockLabel(?string $blockLabel) : self
  170.     {
  171.         $this->blockLabel $blockLabel;
  172.         return $this;
  173.     }
  174.     public function getBlockLabelTranslations() : ?array
  175.     {
  176.         return $this->blockLabelTranslations;
  177.     }
  178.     public function setBlockLabelTranslations(?array $blockLabelTranslations) : self
  179.     {
  180.         $this->blockLabelTranslations $blockLabelTranslations;
  181.         return $this;
  182.     }
  183.     public function getBlockIcon() : ?string
  184.     {
  185.         return $this->blockIcon;
  186.     }
  187.     public function setBlockIcon(?string $blockIcon) : self
  188.     {
  189.         $this->blockIcon $blockIcon;
  190.         return $this;
  191.     }
  192.     public function getBlockColumns() : ?array
  193.     {
  194.         return $this->blockColumns;
  195.     }
  196.     public function setBlockColumns(?array $blockColumns) : self
  197.     {
  198.         $this->blockColumns $blockColumns;
  199.         return $this;
  200.     }
  201.     public function getBlockWidth() : ?array
  202.     {
  203.         return $this->blockWidth;
  204.     }
  205.     public function setBlockWidth(?array $blockWidth) : self
  206.     {
  207.         $this->blockWidth $blockWidth;
  208.         return $this;
  209.     }
  210.     public function getState() : ?int
  211.     {
  212.         return $this->state;
  213.     }
  214.     public function setState(?int $state) : self
  215.     {
  216.         $this->state $state;
  217.         return $this;
  218.     }
  219.     public function getWebPage() : ?WebPage
  220.     {
  221.         return $this->webPage;
  222.     }
  223.     public function setWebPage(?WebPage $webPage) : self
  224.     {
  225.         $this->webPage $webPage;
  226.         return $this;
  227.     }
  228.     public function getBlock() : ?Block
  229.     {
  230.         return $this->block;
  231.     }
  232.     public function setBlock(?Block $block) : self
  233.     {
  234.         $this->block $block;
  235.         return $this;
  236.     }
  237.     public function getOwner() : ?User
  238.     {
  239.         return $this->owner;
  240.     }
  241.     public function setOwner(?User $owner) : self
  242.     {
  243.         $this->owner $owner;
  244.         return $this;
  245.     }
  246.     public function getEntity() : ?DnsitEntity
  247.     {
  248.         return $this->entity;
  249.     }
  250.     public function setEntity(?DnsitEntity $entity) : self
  251.     {
  252.         $this->entity $entity;
  253.         return $this;
  254.     }
  255.     public function getBlockSpecialType() : ?string
  256.     {
  257.         return $this->blockSpecialType;
  258.     }
  259.     public function setBlockSpecialType(?string $blockSpecialType) : self
  260.     {
  261.         $this->blockSpecialType $blockSpecialType;
  262.         return $this;
  263.     }
  264.     public function getParameters() : ?array
  265.     {
  266.         return $this->parameters;
  267.     }
  268.     public function setParameters(?array $parameters) : self
  269.     {
  270.         $this->parameters $parameters;
  271.         return $this;
  272.     }
  273.     public function getBridgeComponent() : ?BridgeComponent
  274.     {
  275.         return $this->bridgeComponent;
  276.     }
  277.     public function setBridgeComponent(?BridgeComponent $bridgeComponent) : self
  278.     {
  279.         $this->bridgeComponent $bridgeComponent;
  280.         return $this;
  281.     }
  282.     public function getWpGroup() : ?WebPageBlockGroup
  283.     {
  284.         return $this->wpGroup;
  285.     }
  286.     public function setWpGroup(?WebPageBlockGroup $group) : self
  287.     {
  288.         $this->wpGroup $group;
  289.         return $this;
  290.     }
  291.     public function getVisibilityOptions() : ?array
  292.     {
  293.         return $this->visibilityOptions;
  294.     }
  295.     public function setVisibilityOptions(?array $visibilityOptions) : self
  296.     {
  297.         $this->visibilityOptions $visibilityOptions;
  298.         return $this;
  299.     }
  300. }