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

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