src/Entity/Gestiform/Formations/Financeur/Financeur.php line 19

  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Financeur;
  3. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  4. use App\Entity\Gestiform\Admin\Tiers;
  5. use App\Entity\Gestiform\Formations\Actions\Action;
  6. use App\Entity\Gestiform\Formations\Catalogue\Module\Module;
  7. use App\Entity\Gestiform\Formations\Financement\Financement;
  8. use App\Repository\Gestiform\Formations\Financeur\FinanceurRepository;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\ORM\Mapping as ORM;
  12. #[ORM\Entity(repositoryClassFinanceurRepository::class)]
  13. class Financeur extends Tiers
  14. {
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private ?string $intitule=null;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private ?string $alt null;
  19.     #[ORM\Column(type'text'nullabletrue)]
  20.     private ?string $commentaire null;
  21.     #[ORM\Column(type'text'nullabletrue)]
  22.     private ?string $detail null;
  23.     #[ORM\Column(type'text'nullabletrue)]
  24.     private ?string $lien null;
  25.     #[ORM\Column(type'text'nullabletrue)]
  26.     private ?string $seotitre null;
  27.     #[ORM\Column(type'text',  nullabletrue)]
  28.     private ?string $seodescription null;
  29.     #[ORM\Column(type'text'nullabletrue)]
  30.     private ?string $keywords null;
  31.     #[ORM\Column(type'integer'nullabletrue)]
  32.     private ?int $remise null;
  33.     #[ORM\ManyToMany(targetEntityModule::class, mappedBy'financeurs')]
  34.     private Collection $modules;
  35.     #[ORM\OneToMany(targetEntityAction::class, mappedBy'financeur'cascade: ['persist''remove'], orphanRemovaltrue)]
  36.     private Collection $actions;
  37.     #[ORM\JoinColumn(nullabletrue)]
  38.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  39.     private ?Masterlistelg $category null;
  40.     #[ORM\JoinColumn(nullabletrue)]
  41.     #[ORM\ManyToOne(targetEntityMasterlistelg::class, cascade: ['persist'])]
  42.     private ?Masterlistelg $financementOpco null;
  43.     #[ORM\JoinColumn(nullabletrue)]
  44.     #[ORM\ManyToOne(targetEntityMasterlistelg::class, cascade: ['persist'])]
  45.     private ?Masterlistelg $type null;
  46.     #[ORM\OneToMany(targetEntityCodeAbsence::class, mappedBy'financeur'cascade: ['persist''remove'], orphanRemovaltrue)]
  47.     private Collection $codeAbsences;
  48.     #[ORM\OneToMany(targetEntityCodeRetard::class, mappedBy'financeur'cascade: ['persist''remove'], orphanRemovaltrue)]
  49.     private Collection $codeRetards;
  50.     #[ORM\OneToMany(targetEntityPerimetreFinancement::class, mappedBy'financeur'cascade: ['persist''remove'], orphanRemovaltrue)]
  51.     private Collection $perimetreFinancements;
  52.     #[ORM\OneToMany(targetEntityFinancement::class, mappedBy'financeur'cascade: ['persist''remove'], orphanRemovaltrue)]
  53.     private Collection $financements;
  54.     public function __construct()
  55.     {
  56.         parent::__construct();
  57.         $this->modules = new ArrayCollection();
  58.         $this->actions = new ArrayCollection();
  59.         $this->codeAbsences = new ArrayCollection();
  60.         $this->codeRetards = new ArrayCollection();
  61.         $this->financements = new ArrayCollection();
  62.         $this->perimetreFinancements = new ArrayCollection();
  63.     }
  64.     public function getAlt(): ?string
  65.     {
  66.         return $this->alt;
  67.     }
  68.     public function setAlt(string $alt): self
  69.     {
  70.         $this->alt $alt;
  71.         return $this;
  72.     }
  73.     public function getCommentaire(): ?string
  74.     {
  75.         return $this->commentaire;
  76.     }
  77.     public function setCommentaire(string $commentaire): self
  78.     {
  79.         $this->commentaire $commentaire;
  80.         return $this;
  81.     }
  82.     public function getDetail(): ?string
  83.     {
  84.         return $this->detail;
  85.     }
  86.     public function setDetail(string $detail): self
  87.     {
  88.         $this->detail $detail;
  89.         return $this;
  90.     }
  91.     public function getLien(): ?string
  92.     {
  93.         return $this->lien;
  94.     }
  95.     public function setLien(string $lien): self
  96.     {
  97.         $this->lien $lien;
  98.         return $this;
  99.     }
  100.     public function getSeotitre(): ?string
  101.     {
  102.         return $this->seotitre;
  103.     }
  104.     public function setSeotitre(string $seotitre): self
  105.     {
  106.         $this->seotitre $seotitre;
  107.         return $this;
  108.     }
  109.     public function getSeodescription(): ?string
  110.     {
  111.         return $this->seodescription;
  112.     }
  113.     public function setSeodescription(string $seodescription): self
  114.     {
  115.         $this->seodescription $seodescription;
  116.         return $this;
  117.     }
  118.     public function getKeywords(): ?string
  119.     {
  120.         return $this->keywords;
  121.     }
  122.     public function setKeywords(string $keywords): self
  123.     {
  124.         $this->keywords $keywords;
  125.         return $this;
  126.     }
  127.     public function getRemise(): ?int
  128.     {
  129.         return $this->remise;
  130.     }
  131.     public function setRemise(int $remise): self
  132.     {
  133.         $this->remise $remise;
  134.         return $this;
  135.     }
  136.     /**
  137.      * @return Collection<int, Module>
  138.      */
  139.     public function getModules(): Collection
  140.     {
  141.         return $this->modules;
  142.     }
  143.     public function addModule(Module $module): self
  144.     {
  145.         if (!$this->modules->contains($module)) {
  146.             $this->modules[] = $module;
  147.             $module->addFinanceur($this);
  148.         }
  149.         return $this;
  150.     }
  151.     public function removeModule(Module $module): self
  152.     {
  153.         if ($this->modules->removeElement($module)) {
  154.             $module->removeFinanceur($this);
  155.         }
  156.         return $this;
  157.     }
  158.     public function getCategory(): ?Masterlistelg
  159.     {
  160.         return $this->category;
  161.     }
  162.     public function setCategory(?Masterlistelg $category): self
  163.     {
  164.         $this->category $category;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return Collection<int, Action>
  169.      */
  170.     public function getActions(): Collection
  171.     {
  172.         return $this->actions;
  173.     }
  174.     public function addAction(Action $action): self
  175.     {
  176.         if (!$this->actions->contains($action)) {
  177.             $this->actions->add($action);
  178.             $action->setFinanceur($this);
  179.         }
  180.         return $this;
  181.     }
  182.     public function removeAction(Action $action): self
  183.     {
  184.         // set the owning side to null (unless already changed)
  185.         if ($this->actions->removeElement($action) && $action->getFinanceur() === $this) {
  186.             $action->setFinanceur(null);
  187.         }
  188.         return $this;
  189.     }
  190.     public function getFinancementOpco(): ?Masterlistelg
  191.     {
  192.         return $this->financementOpco;
  193.     }
  194.     public function setFinancementOpco(?Masterlistelg $financementOpco): self
  195.     {
  196.         $this->financementOpco $financementOpco;
  197.         return $this;
  198.     }
  199.     public function getType(): ?Masterlistelg
  200.     {
  201.         return $this->type;
  202.     }
  203.     public function setType(?Masterlistelg $type): self
  204.     {
  205.         $this->type $type;
  206.         return $this;
  207.     }
  208.     /**
  209.      * @return Collection<int, CodeAbsence>
  210.      */
  211.     public function getCodeAbsences(): Collection
  212.     {
  213.         return $this->codeAbsences;
  214.     }
  215.     public function addCodeAbsence(CodeAbsence $codeAbsence): self
  216.     {
  217.         if (!$this->codeAbsences->contains($codeAbsence)) {
  218.             $this->codeAbsences->add($codeAbsence);
  219.             $codeAbsence->setFinanceur($this);
  220.         }
  221.         return $this;
  222.     }
  223.     public function removeCodeAbsence(CodeAbsence $codeAbsence): self
  224.     {
  225.         // set the owning side to null (unless already changed)
  226.         if ($this->codeAbsences->removeElement($codeAbsence) && $codeAbsence->getFinanceur() === $this) {
  227.             $codeAbsence->setFinanceur(null);
  228.         }
  229.         return $this;
  230.     }
  231.     /**
  232.      * @return Collection<int, CodeRetard>
  233.      */
  234.     public function getCodeRetards(): Collection
  235.     {
  236.         return $this->codeRetards;
  237.     }
  238.     public function addCodeRetard(CodeRetard $codeRetard): self
  239.     {
  240.         if (!$this->codeRetards->contains($codeRetard)) {
  241.             $this->codeRetards->add($codeRetard);
  242.             $codeRetard->setFinanceur($this);
  243.         }
  244.         return $this;
  245.     }
  246.     public function removeCodeRetard(CodeRetard $codeRetard): self
  247.     {
  248.         // set the owning side to null (unless already changed)
  249.         if ($this->codeRetards->removeElement($codeRetard) && $codeRetard->getFinanceur() === $this) {
  250.             $codeRetard->setFinanceur(null);
  251.         }
  252.         return $this;
  253.     }
  254.     /**
  255.      * @return Collection<int, Financement>
  256.      */
  257.     public function getFinancements(): Collection
  258.     {
  259.         return $this->financements;
  260.     }
  261.     public function addFinancement(Financement $financement): static
  262.     {
  263.         if (!$this->financements->contains($financement)) {
  264.             $this->financements->add($financement);
  265.             $financement->setFinanceur($this);
  266.         }
  267.         return $this;
  268.     }
  269.     public function removeFinancement(Financement $financement): static
  270.     {
  271.         // set the owning side to null (unless already changed)
  272.         if ($this->financements->removeElement($financement) && $financement->getFinanceur() === $this) {
  273.             $financement->setFinanceur(null);
  274.         }
  275.         return $this;
  276.     }
  277.     public function getIntitule(): ?string
  278.     {
  279.         return $this->intitule;
  280.     }
  281.     public function setIntitule(?string $intitule): Financeur
  282.     {
  283.         $this->intitule $intitule;
  284.         return $this;
  285.     }
  286.     /**
  287.      * @return Collection<int, PerimetreFinancement>
  288.      */
  289.     public function getPerimetreFinancements(): Collection
  290.     {
  291.         return $this->perimetreFinancements;
  292.     }
  293.     public function addPerimetreFinancement(PerimetreFinancement $perimetreFinancement): self
  294.     {
  295.         if (!$this->perimetreFinancements->contains($perimetreFinancement)) {
  296.             $this->perimetreFinancements->add($perimetreFinancement);
  297.             $perimetreFinancement->setFinanceur($this);
  298.         }
  299.         return $this;
  300.     }
  301.     public function removePerimetreFinancement(PerimetreFinancement $perimetreFinancement): self
  302.     {
  303.         // set the owning side to null (unless already changed)
  304.         if ($this->perimetreFinancements->removeElement($perimetreFinancement) && $perimetreFinancement->getFinanceur() === $this) {
  305.             $perimetreFinancement->setFinanceur(null);
  306.         }
  307.         return $this;
  308.     }
  309. }