src/Entity/EditionModele.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity (repositoryClass="App\Repository\EditionModeleRepository")
  8.  */
  9. class EditionModele
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du modele"})
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplate", inversedBy="modeles")
  23.      * @ORM\JoinColumns({
  24.      *   @ORM\JoinColumn(name="template_id", referencedColumnName="id")
  25.      * })
  26.      */
  27.     private $template;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplateVariant", inversedBy="modeles", cascade={"persist"})
  30.      * @ORM\JoinColumns({
  31.      *   @ORM\JoinColumn(name="variant_id", referencedColumnName="id")
  32.      * })
  33.      */
  34.     private $variant;
  35.     /**
  36.      * @var \Doctrine\Common\Collections\Collection
  37.      *
  38.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubrique", mappedBy="modele", cascade={"persist","remove"}, orphanRemoval=true)
  39.      * @ORM\OrderBy({"ordering" = "ASC"})
  40.      */
  41.     private $rubriques;
  42.     /**
  43.      * @var \Doctrine\Common\Collections\Collection
  44.      *
  45.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleParameter", mappedBy="modele", cascade={"persist","remove"})
  46.      * @ORM\OrderBy({"ordering" = "ASC"})
  47.      */
  48.     private $parameters;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="editionModeles")
  51.      * @ORM\JoinColumns({
  52.      *   @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
  53.      * })
  54.      */
  55.     private $owner;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="editionModeles")
  58.      * @ORM\JoinColumns({
  59.      *   @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
  60.      * })
  61.      */
  62.     private $entity;
  63.     /**
  64.      * @ORM\Column(type="datetime", nullable=true)
  65.      */
  66.     private $createdAt;
  67.     /**
  68.      * @ORM\Column(type="datetime", nullable=true)
  69.      */
  70.     private $updatedAt;
  71.     /**
  72.      * @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"code de statut : 0=OK"})
  73.      */
  74.     private $state;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity="App\Entity\EditionPlanification", mappedBy="modele")
  77.      */
  78.     private $planifications;
  79.     /**
  80.      * @ORM\Column(type="text", nullable=true)
  81.      */
  82.     private $customCss;
  83.     /**
  84.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  85.      */
  86.     private $isInBookletMode;
  87.     /**
  88.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  89.      */
  90.     private $isInAnnonceMode;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplatePied", inversedBy="modeles", cascade={"persist"})
  93.      * @ORM\JoinColumns({
  94.      *   @ORM\JoinColumn(name="pied_id", referencedColumnName="id")
  95.      * })
  96.      */
  97.     private ?EditionTemplatePied $pied;
  98.     public function __construct()
  99.     {
  100.         $this->rubriques = new ArrayCollection();
  101.         $this->parameters = new ArrayCollection();
  102.         $this->planifications = new ArrayCollection();
  103.     }
  104.     public function getId() : ?int
  105.     {
  106.         return $this->id;
  107.     }
  108.     public function getName() : ?string
  109.     {
  110.         return $this->name;
  111.     }
  112.     public function setName(?string $name) : self
  113.     {
  114.         $this->name $name;
  115.         return $this;
  116.     }
  117.     public function getCreatedAt() : ?\DateTimeInterface
  118.     {
  119.         return $this->createdAt;
  120.     }
  121.     public function setCreatedAt(?\DateTimeInterface $createdAt) : self
  122.     {
  123.         $this->createdAt $createdAt;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt() : ?\DateTimeInterface
  127.     {
  128.         return $this->updatedAt;
  129.     }
  130.     public function setUpdatedAt(?\DateTimeInterface $updatedAt) : self
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     public function getState() : ?int
  136.     {
  137.         return $this->state;
  138.     }
  139.     public function setState(?int $state) : self
  140.     {
  141.         $this->state $state;
  142.         return $this;
  143.     }
  144.     public function getTemplate() : ?EditionTemplate
  145.     {
  146.         return $this->template;
  147.     }
  148.     public function setTemplate(?EditionTemplate $template) : self
  149.     {
  150.         $this->template $template;
  151.         return $this;
  152.     }
  153.     /**
  154.      * @return Collection|EditionModeleRubrique[]
  155.      */
  156.     public function getRubriques() : Collection
  157.     {
  158.         return $this->rubriques;
  159.     }
  160.     public function addRubrique(EditionModeleRubrique $rubrique) : self
  161.     {
  162.         if (!$this->rubriques->contains($rubrique)) {
  163.             $this->rubriques[] = $rubrique;
  164.             $rubrique->setModele($this);
  165.         }
  166.         return $this;
  167.     }
  168.     public function removeRubrique(EditionModeleRubrique $rubrique) : self
  169.     {
  170.         if ($this->rubriques->contains($rubrique)) {
  171.             $this->rubriques->removeElement($rubrique);
  172.             // set the owning side to null (unless already changed)
  173.             if ($rubrique->getModele() === $this) {
  174.                 $rubrique->setModele(null);
  175.             }
  176.         }
  177.         return $this;
  178.     }
  179.     /**
  180.      * @return Collection|EditionModeleParameter[]
  181.      */
  182.     public function getParameters() : Collection
  183.     {
  184.         return $this->parameters;
  185.     }
  186.     public function addParameter(EditionModeleParameter $parameter) : self
  187.     {
  188.         if (!$this->parameters->contains($parameter)) {
  189.             $this->parameters[] = $parameter;
  190.             $parameter->setModele($this);
  191.         }
  192.         return $this;
  193.     }
  194.     public function removeParameter(EditionModeleParameter $parameter) : self
  195.     {
  196.         if ($this->parameters->contains($parameter)) {
  197.             $this->parameters->removeElement($parameter);
  198.             // set the owning side to null (unless already changed)
  199.             if ($parameter->getModele() === $this) {
  200.                 $parameter->setModele(null);
  201.             }
  202.         }
  203.         return $this;
  204.     }
  205.     public function getOwner() : ?User
  206.     {
  207.         return $this->owner;
  208.     }
  209.     public function setOwner(?User $owner) : self
  210.     {
  211.         $this->owner $owner;
  212.         return $this;
  213.     }
  214.     public function getEntity() : ?DnsitEntity
  215.     {
  216.         return $this->entity;
  217.     }
  218.     public function setEntity(?DnsitEntity $entity) : self
  219.     {
  220.         $this->entity $entity;
  221.         return $this;
  222.     }
  223.     public function getVariant() : ?EditionTemplateVariant
  224.     {
  225.         return $this->variant;
  226.     }
  227.     public function setVariant(?EditionTemplateVariant $variant) : self
  228.     {
  229.         $this->variant $variant;
  230.         return $this;
  231.     }
  232.     /**
  233.      * @return Collection|EditionPlanification[]
  234.      */
  235.     public function getPlanifications() : Collection
  236.     {
  237.         return $this->planifications;
  238.     }
  239.     public function addPlanification(EditionPlanification $planification) : self
  240.     {
  241.         if (!$this->planifications->contains($planification)) {
  242.             $this->planifications[] = $planification;
  243.             $planification->setModele($this);
  244.         }
  245.         return $this;
  246.     }
  247.     public function removePlanification(EditionPlanification $planification) : self
  248.     {
  249.         if ($this->planifications->contains($planification)) {
  250.             $this->planifications->removeElement($planification);
  251.             // set the owning side to null (unless already changed)
  252.             if ($planification->getModele() === $this) {
  253.                 $planification->setModele(null);
  254.             }
  255.         }
  256.         return $this;
  257.     }
  258.     public function getCustomCss() : ?string
  259.     {
  260.         return $this->customCss;
  261.     }
  262.     public function setCustomCss(?string $customCss) : self
  263.     {
  264.         $this->customCss $customCss;
  265.         return $this;
  266.     }
  267.     public function getIsInBookletMode() : ?bool
  268.     {
  269.         return $this->isInBookletMode;
  270.     }
  271.     public function setIsInBookletMode(?bool $isInBookletMode) : self
  272.     {
  273.         $this->isInBookletMode $isInBookletMode;
  274.         return $this;
  275.     }
  276.     public function getIsInAnnonceMode(): ?bool
  277.     {
  278.         return $this->isInAnnonceMode;
  279.     }
  280.     public function setIsInAnnonceMode(?bool $isInAnnonceMode): self
  281.     {
  282.         $this->isInAnnonceMode $isInAnnonceMode;
  283.         return $this;
  284.     }
  285.     public function getPied() : ?EditionTemplatePied
  286.     {
  287.         return $this->pied;
  288.     }
  289.     public function setPied(?EditionTemplatePied $pied) : self
  290.     {
  291.         $this->pied $pied;
  292.         return $this;
  293.     }
  294. }