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

Open in your IDE?
  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. /**
  14.  * @ORM\Entity(repositoryClass=FinanceurRepository::class)
  15.  */
  16. class Financeur extends Tiers
  17. {
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private ?string $intitule=null;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Financement::class, mappedBy="financeur",cascade={"persist"})
  24.      */
  25.     private Collection $financements;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private ?string $alt null;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private ?string $commentaire null;
  34.     /**
  35.      * @ORM\Column(type="text", length=255, nullable=true)
  36.      */
  37.     private ?string $detail null;
  38.     /**
  39.      * @ORM\Column(type="text", nullable=true)
  40.      */
  41.     private ?string $lien null;
  42.     /**
  43.      * @ORM\Column(type="text", nullable=true)
  44.      */
  45.     private ?string $seotitre null;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private ?string $seodescription null;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private ?string $keywords null;
  54.     /**
  55.      * @ORM\Column(type="integer", nullable=true)
  56.      */
  57.     private ?int $remise null;
  58.     /**
  59.      * @ORM\ManyToMany(targetEntity=Module::class, mappedBy="financeurs")
  60.      */
  61.     private Collection $modules;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=Action::class, mappedBy="financeur",cascade={"persist"})
  64.      */
  65.     private Collection $actions;
  66.     /**
  67.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  68.      * @ORM\JoinColumn(nullable=true)
  69.      */
  70.     private ?Masterlistelg $category null;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class, cascade={"persist"})
  73.      * @ORM\JoinColumn(nullable=true)
  74.      */
  75.     private ?Masterlistelg $financementOpco null;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class, cascade={"persist"})
  78.      * @ORM\JoinColumn(nullable=true)
  79.      */
  80.     private ?Masterlistelg $type null;
  81.     /**
  82.      * @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
  83.      * @ORM\JoinColumn(nullable=true)
  84.      */
  85.     private ?Upload $photo null;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity=CodeAbsence::class, cascade={"persist", "remove"}, mappedBy="financeur", orphanRemoval=true)
  88.      */
  89.     private Collection $codeAbsences;
  90.     /**
  91.      * @ORM\OneToMany(targetEntity=CodeRetard::class, cascade={"persist", "remove"}, mappedBy="financeur", orphanRemoval=true)
  92.      */
  93.     private Collection $codeRetards;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity=PerimetreFinancement::class, mappedBy="financeur")
  96.      */
  97.     private Collection $perimetreFinancements;
  98.     public function __construct()
  99.     {
  100.         parent::__construct();
  101.         $this->modules = new ArrayCollection();
  102.         $this->actions = new ArrayCollection();
  103.         $this->codeAbsences = new ArrayCollection();
  104.         $this->codeRetards = new ArrayCollection();
  105.         $this->financements = new ArrayCollection();
  106.         $this->perimetreFinancements = new ArrayCollection();
  107.     }
  108.     public function getAlt(): ?string
  109.     {
  110.         return $this->alt;
  111.     }
  112.     public function setAlt(string $alt): self
  113.     {
  114.         $this->alt $alt;
  115.         return $this;
  116.     }
  117.     public function getCommentaire(): ?string
  118.     {
  119.         return $this->commentaire;
  120.     }
  121.     public function setCommentaire(string $commentaire): self
  122.     {
  123.         $this->commentaire $commentaire;
  124.         return $this;
  125.     }
  126.     public function getDetail(): ?string
  127.     {
  128.         return $this->detail;
  129.     }
  130.     public function setDetail(string $detail): self
  131.     {
  132.         $this->detail $detail;
  133.         return $this;
  134.     }
  135.     public function getLien(): ?string
  136.     {
  137.         return $this->lien;
  138.     }
  139.     public function setLien(string $lien): self
  140.     {
  141.         $this->lien $lien;
  142.         return $this;
  143.     }
  144.     public function getSeotitre(): ?string
  145.     {
  146.         return $this->seotitre;
  147.     }
  148.     public function setSeotitre(string $seotitre): self
  149.     {
  150.         $this->seotitre $seotitre;
  151.         return $this;
  152.     }
  153.     public function getSeodescription(): ?string
  154.     {
  155.         return $this->seodescription;
  156.     }
  157.     public function setSeodescription(string $seodescription): self
  158.     {
  159.         $this->seodescription $seodescription;
  160.         return $this;
  161.     }
  162.     public function getKeywords(): ?string
  163.     {
  164.         return $this->keywords;
  165.     }
  166.     public function setKeywords(string $keywords): self
  167.     {
  168.         $this->keywords $keywords;
  169.         return $this;
  170.     }
  171.     public function getRemise(): ?int
  172.     {
  173.         return $this->remise;
  174.     }
  175.     public function setRemise(int $remise): self
  176.     {
  177.         $this->remise $remise;
  178.         return $this;
  179.     }
  180.     /**
  181.      * @return Collection<int, Module>
  182.      */
  183.     public function getModules(): Collection
  184.     {
  185.         return $this->modules;
  186.     }
  187.     public function addModule(Module $module): self
  188.     {
  189.         if (!$this->modules->contains($module)) {
  190.             $this->modules[] = $module;
  191.             $module->addFinanceur($this);
  192.         }
  193.         return $this;
  194.     }
  195.     public function removeModule(Module $module): self
  196.     {
  197.         if ($this->modules->removeElement($module)) {
  198.             $module->removeFinanceur($this);
  199.         }
  200.         return $this;
  201.     }
  202.     public function getCategory(): ?Masterlistelg
  203.     {
  204.         return $this->category;
  205.     }
  206.     public function setCategory(?Masterlistelg $category): self
  207.     {
  208.         $this->category $category;
  209.         return $this;
  210.     }
  211.     /**
  212.      * @return Collection<int, Action>
  213.      */
  214.     public function getActions(): Collection
  215.     {
  216.         return $this->actions;
  217.     }
  218.     public function addAction(Action $action): self
  219.     {
  220.         if (!$this->actions->contains($action)) {
  221.             $this->actions->add($action);
  222.             $action->setFinanceur($this);
  223.         }
  224.         return $this;
  225.     }
  226.     public function removeAction(Action $action): self
  227.     {
  228.         if ($this->actions->removeElement($action)) {
  229.             // set the owning side to null (unless already changed)
  230.             if ($action->getFinanceur() === $this) {
  231.                 $action->setFinanceur(null);
  232.             }
  233.         }
  234.         return $this;
  235.     }
  236.     public function getFinancementOpco(): ?Masterlistelg
  237.     {
  238.         return $this->financementOpco;
  239.     }
  240.     public function setFinancementOpco(?Masterlistelg $financementOpco): self
  241.     {
  242.         $this->financementOpco $financementOpco;
  243.         return $this;
  244.     }
  245.     public function getType(): ?Masterlistelg
  246.     {
  247.         return $this->type;
  248.     }
  249.     public function setType(?Masterlistelg $type): self
  250.     {
  251.         $this->type $type;
  252.         return $this;
  253.     }
  254.     public function getPhoto(): ?Upload
  255.     {
  256.         return $this->photo;
  257.     }
  258.     public function setPhoto(?Upload $photo): self
  259.     {
  260.         $this->photo $photo;
  261.         return $this;
  262.     }
  263.     /**
  264.      * @return Collection<int, CodeAbsence>
  265.      */
  266.     public function getCodeAbsences(): Collection
  267.     {
  268.         return $this->codeAbsences;
  269.     }
  270.     public function addCodeAbsence(CodeAbsence $codeAbsence): self
  271.     {
  272.         if (!$this->codeAbsences->contains($codeAbsence)) {
  273.             $this->codeAbsences->add($codeAbsence);
  274.             $codeAbsence->setFinanceur($this);
  275.         }
  276.         return $this;
  277.     }
  278.     public function removeCodeAbsence(CodeAbsence $codeAbsence): self
  279.     {
  280.         if ($this->codeAbsences->removeElement($codeAbsence)) {
  281.             // set the owning side to null (unless already changed)
  282.             if ($codeAbsence->getFinanceur() === $this) {
  283.                 $codeAbsence->setFinanceur(null);
  284.             }
  285.         }
  286.         return $this;
  287.     }
  288.     /**
  289.      * @return Collection<int, CodeRetard>
  290.      */
  291.     public function getCodeRetards(): Collection
  292.     {
  293.         return $this->codeRetards;
  294.     }
  295.     public function addCodeRetard(CodeRetard $codeRetard): self
  296.     {
  297.         if (!$this->codeRetards->contains($codeRetard)) {
  298.             $this->codeRetards->add($codeRetard);
  299.             $codeRetard->setFinanceur($this);
  300.         }
  301.         return $this;
  302.     }
  303.     public function removeCodeRetard(CodeRetard $codeRetard): self
  304.     {
  305.         if ($this->codeRetards->removeElement($codeRetard)) {
  306.             // set the owning side to null (unless already changed)
  307.             if ($codeRetard->getFinanceur() === $this) {
  308.                 $codeRetard->setFinanceur(null);
  309.             }
  310.         }
  311.         return $this;
  312.     }
  313.     /**
  314.      * @return Collection<int, Financement>
  315.      */
  316.     public function getFinancements(): Collection
  317.     {
  318.         return $this->financements;
  319.     }
  320.     public function addFinancement(Financement $financement): static
  321.     {
  322.         if (!$this->financements->contains($financement)) {
  323.             $this->financements->add($financement);
  324.             $financement->setFinanceur($this);
  325.         }
  326.         return $this;
  327.     }
  328.     public function removeFinancement(Financement $financement): static
  329.     {
  330.         if ($this->financements->removeElement($financement)) {
  331.             // set the owning side to null (unless already changed)
  332.             if ($financement->getFinanceur() === $this) {
  333.                 $financement->setFinanceur(null);
  334.             }
  335.         }
  336.         return $this;
  337.     }
  338.     public function getIntitule(): ?string
  339.     {
  340.         return $this->intitule;
  341.     }
  342.     public function setIntitule(?string $intitule): Financeur
  343.     {
  344.         $this->intitule $intitule;
  345.         return $this;
  346.     }
  347.     /**
  348.      * @return Collection<int, PerimetreFinancement>
  349.      */
  350.     public function getPerimetreFinancements(): Collection
  351.     {
  352.         return $this->perimetreFinancements;
  353.     }
  354.     public function addPerimetreFinancement(PerimetreFinancement $perimetreFinancement): self
  355.     {
  356.         if (!$this->perimetreFinancements->contains($perimetreFinancement)) {
  357.             $this->perimetreFinancements->add($perimetreFinancement);
  358.             $perimetreFinancement->setFinanceur($this);
  359.         }
  360.         return $this;
  361.     }
  362.     public function removePerimetreFinancement(PerimetreFinancement $perimetreFinancement): self
  363.     {
  364.         if ($this->perimetreFinancements->removeElement($perimetreFinancement)) {
  365.             // set the owning side to null (unless already changed)
  366.             if ($perimetreFinancement->getFinanceur() === $this) {
  367.                 $perimetreFinancement->setFinanceur(null);
  368.             }
  369.         }
  370.         return $this;
  371.     }
  372. }