src/Entity/VariablesGroup.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VariablesGroupRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassVariablesGroupRepository::class)]
  9. class VariablesGroup
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $label null;
  17.     #[ORM\Column]
  18.     private ?int $ordre null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $date_creation null;
  21.     #[ORM\OneToMany(mappedBy'variable_group'targetEntityVariable::class, cascade: ['remove''persist'])]
  22.     private Collection $variables;
  23.     #[ORM\ManyToMany(targetEntityContactType::class, inversedBy'variablesGroups')]
  24.     private Collection $contact_group;
  25.     #[ORM\ManyToMany(targetEntityProjectType::class, inversedBy'variablesGroups')]
  26.     private Collection $project_group;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?bool $societe null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?bool $utilisateur null;
  31.     #[ORM\ManyToOne(inversedBy'variablesGroups')]
  32.     private ?Document $document null;
  33.     #[ORM\Column(nullablefalse)]
  34.     private ?int $colonne null;
  35.     public function __construct()
  36.     {
  37.         $this->variables = new ArrayCollection();
  38.         $this->contact_group = new ArrayCollection();
  39.         $this->project_group = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getLabel(): ?string
  46.     {
  47.         return $this->label;
  48.     }
  49.     public function setLabel(string $label): static
  50.     {
  51.         $this->label $label;
  52.         return $this;
  53.     }
  54.     public function getOrdre(): ?int
  55.     {
  56.         return $this->ordre;
  57.     }
  58.     public function setOrdre(int $ordre): static
  59.     {
  60.         $this->ordre $ordre;
  61.         return $this;
  62.     }
  63.     public function getDateCreation(): ?\DateTimeInterface
  64.     {
  65.         return $this->date_creation;
  66.     }
  67.     public function setDateCreation(\DateTimeInterface $date_creation): static
  68.     {
  69.         $this->date_creation $date_creation;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return Collection<int, Variable>
  74.      */
  75.     public function getVariables(): Collection
  76.     {
  77.         return $this->variables;
  78.     }
  79.     public function addVariable(Variable $variable): static
  80.     {
  81.         if (!$this->variables->contains($variable)) {
  82.             $this->variables->add($variable);
  83.             $variable->setVariableGroup($this);
  84.         }
  85.         return $this;
  86.     }
  87.     public function removeVariable(Variable $variable): static
  88.     {
  89.         if ($this->variables->removeElement($variable)) {
  90.             // set the owning side to null (unless already changed)
  91.             if ($variable->getVariableGroup() === $this) {
  92.                 $variable->setVariableGroup(null);
  93.             }
  94.         }
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return Collection<int, ContactType>
  99.      */
  100.     public function getContactGroup(): Collection
  101.     {
  102.         return $this->contact_group;
  103.     }
  104.     public function addContactGroup(ContactType $contactGroupId): static
  105.     {
  106.         if (!$this->contact_group->contains($contactGroupId)) {
  107.             $this->contact_group->add($contactGroupId);
  108.         }
  109.         return $this;
  110.     }
  111.     public function removeContactGroup(ContactType $contactGroupId): static
  112.     {
  113.         $this->contact_group->removeElement($contactGroupId);
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return Collection<int, ProjectType>
  118.      */
  119.     public function getProjectGroup(): Collection
  120.     {
  121.         return $this->project_group;
  122.     }
  123.     public function addProjectGroup(ProjectType $projectGroup): static
  124.     {
  125.         if (!$this->project_group->contains($projectGroup)) {
  126.             $this->project_group->add($projectGroup);
  127.         }
  128.         return $this;
  129.     }
  130.     public function removeProjectGroup(ProjectType $projectGroup): static
  131.     {
  132.         $this->project_group->removeElement($projectGroup);
  133.         return $this;
  134.     }
  135.     public function isSociete(): ?bool
  136.     {
  137.         return $this->societe;
  138.     }
  139.     public function setSociete(?bool $societe): static
  140.     {
  141.         $this->societe $societe;
  142.         return $this;
  143.     }
  144.     public function isUtilisateur(): ?bool
  145.     {
  146.         return $this->utilisateur;
  147.     }
  148.     public function setUtilisateur(?bool $utilisateur): static
  149.     {
  150.         $this->utilisateur $utilisateur;
  151.         return $this;
  152.     }
  153.     public function getDocument(): ?Document
  154.     {
  155.         return $this->document;
  156.     }
  157.     public function setDocument(?Document $document): static
  158.     {
  159.         $this->document $document;
  160.         return $this;
  161.     }
  162.     public function getColonne(): ?int
  163.     {
  164.         return $this->colonne;
  165.     }
  166.     public function setColonne(?int $colonne): static
  167.     {
  168.         $this->colonne $colonne;
  169.         return $this;
  170.     }
  171. }