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