src/Entity/Gestiform/Formations/Catalogue/Module/Module.php line 36

  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Catalogue\Module;
  3. use App\Entity\AbstractEntity;
  4. use App\Entity\Common\Document;
  5. use App\Entity\Common\Upload;
  6. use App\Entity\Gestiform\Admin\ApiGestiform;
  7. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  8. use App\Entity\Gestiform\Admin\Societe;
  9. use App\Entity\Gestiform\Admin\Tarifs\TarifVenteTheme;
  10. use App\Entity\Gestiform\Admin\Tarifs\TarifVenteThemeIntra;
  11. use App\Entity\Gestiform\Formations\Catalogue\Certification;
  12. use App\Entity\Gestiform\Formations\Catalogue\Parcours\Bloc\BlocModule;
  13. use App\Entity\Gestiform\Formations\Catalogue\Theme\SousThemeTheme;
  14. use App\Entity\Gestiform\Formations\Catalogue\Theme\Theme;
  15. use App\Entity\Gestiform\Formations\Financeur\Financeur;
  16. use App\Entity\Gestiform\Formations\Formateur\FormateurModule;
  17. use App\Entity\Gestiform\Formations\Session\Planning\Event;
  18. use App\Entity\Trait\ApiGestiformEntity;
  19. use App\Repository\Gestiform\Formations\Catalogue\Module\ModuleRepository;
  20. use Doctrine\Common\Collections\ArrayCollection;
  21. use Doctrine\Common\Collections\Collection;
  22. use Doctrine\ORM\Mapping as ORM;
  23. use Symfony\Component\Validator\Constraints as Assert;
  24. #[ORM\Entity(repositoryClassModuleRepository::class)]
  25. #[ORM\InheritanceType('JOINED')]
  26. #[ORM\DiscriminatorColumn(name'type'type'string')]
  27. #[ORM\DiscriminatorMap(['module' => 'Module''certification' => Certification::class])]
  28. class Module extends AbstractEntity
  29. {
  30.     use ApiGestiformEntity;
  31.     #[ORM\Column(type'string'length255nullablefalse)]
  32.     private string $intitule;
  33.     #[ORM\Column(type'integer'nullabletrue)]
  34.     private ?int $duree null;
  35.     #[ORM\Column(type'boolean'nullabletrue)]
  36.     private ?bool $publie false;
  37.     #[ORM\Column(type'boolean'nullabletrue)]
  38.     private ?bool $cpf false;
  39.     #[ORM\Column(type'boolean'nullabletrue)]
  40.     private ?bool $certifiantes false;
  41.     #[ORM\Column(type'boolean')]
  42.     private bool $isDefault false;
  43.     #[ORM\Column(type'boolean'nullabletrue)]
  44.     private bool $certifiante false;
  45.     #[ORM\Column(type'string'length255nullabletrue)]
  46.     private ?string $code null;
  47.     #[ORM\Column(type'text'nullabletrue)]
  48.     private ?string $modalitepedagogiques null;
  49.     #[ORM\Column(type'text'nullabletrue)]
  50.     private ?string $statistiques null;
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private ?string $modaliteevaluationinitial null;
  53.     #[ORM\Column(type'text'nullabletrue)]
  54.     private ?string $modaliteevaluationfinal null;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     private ?string $path null;
  57.     #[ORM\Column(type'string'length255nullabletrue)]
  58.     private ?string $codeCpf null;
  59.     #[ORM\Column(type'string'length255nullabletrue)]
  60.     private ?string $codeCpfSalarie null;
  61.     #[ORM\Column(type'string'length255nullabletrue)]
  62.     private ?string $codeCpfDemandeurEmploi null;
  63.     #[ORM\Column(type'float'nullabletrue)]
  64.     private ?float $tarifInterJour null;
  65.     #[ORM\Column(type'float'nullabletrue)]
  66.     private ?float $tarifInterHoraire null;
  67.     #[ORM\Column(type'float'nullabletrue)]
  68.     private ?float $tarifIntraJour null;
  69.     #[ORM\Column(type'float'nullabletrue)]
  70.     private ?float $tarifIntraHoraire null;
  71.     #[ORM\Column(type'float'nullabletrue)]
  72.     private ?float $tarifJury null;
  73.     #[ORM\Column(type'float'nullabletrue)]
  74.     private ?float $tarifJury2 null;
  75.     #[ORM\Column(type'boolean'nullabletrue)]
  76.     private ?bool $tarifJuryTtc null;
  77.     #[ORM\Column(type'text'nullabletrue)]
  78.     private ?string $prerequis null;
  79.     #[ORM\Column(type'text'nullabletrue)]
  80.     private ?string $objectif null;
  81.     #[ORM\Column(type'text'nullabletrue)]
  82.     private ?string $plus null;
  83.     #[ORM\Column(type'text'nullabletrue)]
  84.     private ?string $public null;
  85.     #[ORM\Column(type'string'length255nullabletrue)]
  86.     private ?string $commentaire null;
  87.     #[ORM\Column(type'text'nullabletrue)]
  88.     private ?string $certificationCommentaire null;
  89.     #[ORM\Column(type'string'length255nullabletrue)]
  90.     private ?string $seoTitre null;
  91.     #[ORM\Column(type'string'length255nullabletrue)]
  92.     private ?string $seoDescription null;
  93.     #[ORM\Column(type'text'nullabletrue)]
  94.     private ?string $infoPratique null;
  95.     #[ORM\Column(type'text'nullabletrue)]
  96.     #[Assert\NotBlank(message'Ce champ est obligatoire.'groups: ['module'])]
  97.     private ?string $accessibiliteHandicap null;
  98.     #[ORM\Column(type'string'length255nullabletrue)]
  99.     private ?string $altVignette null;
  100.     #[ORM\Column(type'text'nullabletrue)]
  101.     private ?string $description null;
  102.     #[ORM\Column(type'text'nullabletrue)]
  103.     private ?string $modalitesDelaisAcces null;
  104.     #[ORM\Column(type'string'length255nullabletrue)]
  105.     private ?string $altBanniere null;
  106.     #[ORM\Column(type'string'length255nullabletrue)]
  107.     private ?string $identifiantDokelio null;
  108.     #[ORM\Column(type'boolean'nullabletrue)]
  109.     private ?bool $publication false;
  110.     #[ORM\Column(type'text'nullabletrue)]
  111.     private ?string $contenuApres null;
  112.     #[ORM\Column(type'text'nullabletrue)]
  113.     private ?string $contenuAvant null;
  114.     #[ORM\Column(name'tauxObtention'type'text'nullabletrue)]
  115.     private ?string $tauxObtention null;
  116.     #[ORM\Column(name'tauxAbandon'type'text'nullabletrue)]
  117.     private ?string $tauxAbandon null;
  118.     #[ORM\Column(name'tauxSatisfaction'type'text'nullabletrue)]
  119.     private ?string $tauxSatisfaction null;
  120.     #[ORM\Column(name'tauxPourSuiteEtude'type'text'nullabletrue)]
  121.     private ?string $tauxPourSuiteEtude null;
  122.     #[ORM\Column(name'tauxEmployabilite'type'text'nullabletrue)]
  123.     private ?string $tauxEmployabilite null;
  124.     #[ORM\Column(name'salaireMoyen'type'text'nullabletrue)]
  125.     private ?string $salaireMoyen null;
  126.     #[ORM\Column(type'integer'nullabletrue)]
  127.     private ?int $nbrsessioninter null;
  128.     #[ORM\Column(type'integer'nullabletrue)]
  129.     private ?int $nbrsessionintra null;
  130.     #[ORM\OneToMany(targetEntityEvent::class, mappedBy'module'cascade: ['persist''remove'], orphanRemovaltrue)]
  131.     private Collection $events;
  132.     #[ORM\OneToMany(targetEntityBlocModule::class, mappedBy'module'cascade: ['persist''remove'], orphanRemovaltrue)]
  133.     private Collection $blocModules;
  134.     #[ORM\OneToMany(targetEntityChapitre::class, mappedBy'module'cascade: ['persist''remove'], orphanRemovaltrue)]
  135.     private Collection $chapitres;
  136.     #[ORM\JoinColumn(nullabletrue)]
  137.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  138.     private ?Masterlistelg $modeFormation null;
  139.     #[ORM\Column(type'json'nullabletrue)]
  140.     private ?array $modesFormation null;
  141.     #[ORM\ManyToOne(targetEntitySousThemeTheme::class, inversedBy'modules')]
  142.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  143.     private ?SousThemeTheme $sousThemeTheme null;
  144.     #[ORM\ManyToOne(targetEntityTheme::class)]
  145.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  146.     private ?Theme $themeTarif null;
  147.     #[ORM\JoinTable(name'module_exige_avant')]
  148.     #[ORM\ManyToMany(targetEntityModule::class)]
  149.     private Collection $modulesExigeAvant;
  150.     #[ORM\JoinTable(name'module_souhaitable_avant')]
  151.     #[ORM\ManyToMany(targetEntityModule::class)]
  152.     private Collection $modulesSouhaitableAvant;
  153.     #[ORM\JoinTable(name'module_conseille_apres')]
  154.     #[ORM\ManyToMany(targetEntityModule::class)]
  155.     private Collection $modulesConseilleApres;
  156.     #[ORM\OneToMany(targetEntityModuleCompetence::class, mappedBy'module'cascade: ['persist''remove'], orphanRemovaltrue)]
  157.     private Collection $moduleCompetences;
  158.     #[ORM\ManyToMany(targetEntityFinanceur::class, inversedBy'modules'cascade: ['persist'])]
  159.     private Collection $financeurs;
  160.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  161.     private ?Masterlistelg $niveaumateriel null;
  162.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  163.     private ?Masterlistelg $niveautechnique null;
  164.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  165.     private ?Masterlistelg $autoriteDelivranceCpf null;
  166.     #[ORM\JoinColumn(nullabletrue)]
  167.     #[ORM\OneToMany(targetEntityModuleModaliteEvaluationFinale::class, mappedBy'module'cascade: ['persist'])]
  168.     private Collection $moduleModaliteEvaluationFinales;
  169.     #[ORM\JoinColumn(nullabletrue)]
  170.     #[ORM\ManyToOne(targetEntityUpload::class, cascade: ['persist''remove'])]
  171.     private ?Upload $banniere null;
  172.     #[ORM\JoinColumn(nullabletrue)]
  173.     #[ORM\ManyToOne(targetEntityUpload::class, cascade: ['persist''remove'])]
  174.     private ?Upload $vignette null;
  175.     #[ORM\OneToMany(targetEntityFormateurModule::class, mappedBy'module')]
  176.     private Collection $formateurModules;
  177.     #[ORM\OneToMany(targetEntityTarifVenteTheme::class, mappedBy'module',
  178.     cascade: ['persist''remove'],
  179.     orphanRemovaltrue
  180. )]
  181.     private Collection $tarifsVentes;
  182.     #[ORM\OneToMany(targetEntityTarifVenteThemeIntra::class, mappedBy'moduleIntra',
  183.         cascade: ['persist''remove'],
  184.         orphanRemovaltrue
  185.     )]
  186.     private Collection $tarifsVenteIntras;
  187.     #[ORM\ManyToMany(targetEntityCertification::class, inversedBy'modules'cascade: ['persist'])]
  188.     private Collection $certifications;
  189.     #[ORM\OneToMany(targetEntityDocument::class, mappedBy'module'cascade: ['persist''remove'], orphanRemovaltrue)]
  190.     private Collection $documents;
  191.     public function __construct()
  192.     {
  193.         $this->certifications = new ArrayCollection();
  194.         $this->blocModules = new ArrayCollection();
  195.         $this->chapitres = new ArrayCollection();
  196.         $this->modulesExigeAvant = new ArrayCollection();
  197.         $this->modulesSouhaitableAvant = new ArrayCollection();
  198.         $this->modulesConseilleApres = new ArrayCollection();
  199.         $this->moduleCompetences = new ArrayCollection();
  200.         $this->financeurs = new ArrayCollection();
  201.         $this->moduleModaliteEvaluationFinales = new ArrayCollection();
  202.         $this->formateurModules = new ArrayCollection();
  203.         $this->tarifsVentes = new ArrayCollection();
  204.         $this->tarifsVenteIntras = new ArrayCollection();
  205.         $this->events = new ArrayCollection();
  206.         $this->documents = new ArrayCollection();
  207.     }
  208.     public function getIntitule(): ?string
  209.     {
  210.         return $this->intitule;
  211.     }
  212.     public function setIntitule(string $intitule): self
  213.     {
  214.         $this->intitule $intitule;
  215.         return $this;
  216.     }
  217.     public function getTarifJury2(): ?float
  218.     {
  219.         return $this->tarifJury2;
  220.     }
  221.     public function setTarifJury2(?float $tarifJury2): self
  222.     {
  223.         $this->tarifJury2 $tarifJury2;
  224.         return $this;
  225.     }
  226.     public function isTarifJuryTtc(): ?bool
  227.     {
  228.         return $this->tarifJuryTtc;
  229.     }
  230.     public function setTarifJuryTtc(?bool $tarifJuryTtc): self
  231.     {
  232.         $this->tarifJuryTtc $tarifJuryTtc;
  233.         return $this;
  234.     }
  235.     /**
  236.      * Helper to access the default company without exposing ApiGestiform upstream.
  237.      */
  238.     public function tSocieteParDefaut(): ?Societe
  239.     {
  240.         return $this->getApiGestiform()?->getSocieteParDefaut();
  241.     }
  242.     public function getDuree(): ?int
  243.     {
  244.         return $this->duree;
  245.     }
  246.     public function setDuree(?int $duree): self
  247.     {
  248.         $this->duree $duree;
  249.         return $this;
  250.     }
  251.     public function getModesFormation(): array
  252.     {
  253.         return $this->modesFormation ?? [];
  254.     }
  255.     public function setModesFormation(?array $modesFormation): self
  256.     {
  257.         $this->modesFormation $modesFormation;
  258.         return $this;
  259.     }
  260.     public function isCertifiante(): ?bool
  261.     {
  262.         return $this->certifiante;
  263.     }
  264.     public function setCertifiante(?bool $certifiante): self
  265.     {
  266.         $this->certifiante $certifiante;
  267.         return $this;
  268.     }
  269.     public function getCode(): ?string
  270.     {
  271.         return $this->code;
  272.     }
  273.     public function setCode(?string $code): self
  274.     {
  275.         $this->code $code;
  276.         return $this;
  277.     }
  278.     public function getPath(): ?string
  279.     {
  280.         return $this->path;
  281.     }
  282.     public function setPath(?string $path): self
  283.     {
  284.         $this->path $path;
  285.         return $this;
  286.     }
  287.     public function isCpf(): ?bool
  288.     {
  289.         return $this->cpf;
  290.     }
  291.     public function setCpf(?bool $cpf): self
  292.     {
  293.         $this->cpf $cpf;
  294.         return $this;
  295.     }
  296.     public function getPublie(): ?bool
  297.     {
  298.         return $this->publie;
  299.     }
  300.     public function setPublie(?bool $publie): self
  301.     {
  302.         $this->publie $publie;
  303.         return $this;
  304.     }
  305.     public function getCertifiantes(): ?bool
  306.     {
  307.         return $this->certifiantes;
  308.     }
  309.     public function setCertifiantes(?bool $certifiantes): self
  310.     {
  311.         $this->certifiantes $certifiantes;
  312.         return $this;
  313.     }
  314.     public function getCodeCpf(): ?string
  315.     {
  316.         return $this->codeCpf;
  317.     }
  318.     public function setCodeCpf(?string $codeCpf): self
  319.     {
  320.         $this->codeCpf $codeCpf;
  321.         return $this;
  322.     }
  323.     public function getCodeCpfSalarie(): ?string
  324.     {
  325.         return $this->codeCpfSalarie;
  326.     }
  327.     public function setCodeCpfSalarie(?string $codeCpfSalarie): self
  328.     {
  329.         $this->codeCpfSalarie $codeCpfSalarie;
  330.         return $this;
  331.     }
  332.     public function getCodeCpfDemandeurEmploi(): ?string
  333.     {
  334.         return $this->codeCpfDemandeurEmploi;
  335.     }
  336.     public function setCodeCpfDemandeurEmploi(?string $codeCpfDemandeurEmploi): self
  337.     {
  338.         $this->codeCpfDemandeurEmploi $codeCpfDemandeurEmploi;
  339.         return $this;
  340.     }
  341.     public function getTarifInterJour(): ?float
  342.     {
  343.         return $this->tarifInterJour;
  344.     }
  345.     public function setTarifInterJour(?float $tarifInterJour): self
  346.     {
  347.         $this->tarifInterJour $tarifInterJour;
  348.         return $this;
  349.     }
  350.     public function getTarifInterHoraire(): ?float
  351.     {
  352.         return $this->tarifInterHoraire;
  353.     }
  354.     public function setTarifInterHoraire(?float $tarifInterHoraire): self
  355.     {
  356.         $this->tarifInterHoraire $tarifInterHoraire;
  357.         return $this;
  358.     }
  359.     public function getTarifIntraJour(): ?float
  360.     {
  361.         return $this->tarifIntraJour;
  362.     }
  363.     public function setTarifIntraJour(?float $tarifIntraJour): self
  364.     {
  365.         $this->tarifIntraJour $tarifIntraJour;
  366.         return $this;
  367.     }
  368.     public function getTarifIntraHoraire(): ?float
  369.     {
  370.         return $this->tarifIntraHoraire;
  371.     }
  372.     public function setTarifIntraHoraire(?float $tarifIntraHoraire): self
  373.     {
  374.         $this->tarifIntraHoraire $tarifIntraHoraire;
  375.         return $this;
  376.     }
  377.     public function getTarifJury(): ?float
  378.     {
  379.         return $this->tarifJury;
  380.     }
  381.     public function setTarifJury(?float $tarifJury): self
  382.     {
  383.         $this->tarifJury $tarifJury;
  384.         return $this;
  385.     }
  386.     public function getPrerequis(): ?string
  387.     {
  388.         return $this->prerequis;
  389.     }
  390.     public function setPrerequis(?string $prerequis): self
  391.     {
  392.         $this->prerequis $prerequis;
  393.         return $this;
  394.     }
  395.     public function getObjectif(): ?string
  396.     {
  397.         return $this->objectif;
  398.     }
  399.     public function setObjectif(?string $objectif): self
  400.     {
  401.         $this->objectif $objectif;
  402.         return $this;
  403.     }
  404.     public function getPlus(): ?string
  405.     {
  406.         return $this->plus;
  407.     }
  408.     public function setPlus(?string $plus): self
  409.     {
  410.         $this->plus $plus;
  411.         return $this;
  412.     }
  413.     public function getPublic(): ?string
  414.     {
  415.         return $this->public;
  416.     }
  417.     public function setPublic(?string $public): self
  418.     {
  419.         $this->public $public;
  420.         return $this;
  421.     }
  422.     public function getCommentaire(): ?string
  423.     {
  424.         return $this->commentaire;
  425.     }
  426.     public function setCommentaire(?string $commentaire): self
  427.     {
  428.         $this->commentaire $commentaire;
  429.         return $this;
  430.     }
  431.     public function getCertificationCommentaire(): ?string
  432.     {
  433.         return $this->certificationCommentaire;
  434.     }
  435.     public function setCertificationCommentaire(?string $certificationCommentaire): self
  436.     {
  437.         $this->certificationCommentaire $certificationCommentaire;
  438.         return $this;
  439.     }
  440.     public function getSeoTitre(): ?string
  441.     {
  442.         return $this->seoTitre;
  443.     }
  444.     public function setSeoTitre(?string $seoTitre): self
  445.     {
  446.         $this->seoTitre $seoTitre;
  447.         return $this;
  448.     }
  449.     public function getSeoDescription(): ?string
  450.     {
  451.         return $this->seoDescription;
  452.     }
  453.     public function setSeoDescription(?string $seoDescription): self
  454.     {
  455.         $this->seoDescription $seoDescription;
  456.         return $this;
  457.     }
  458.     public function getInfoPratique(): ?string
  459.     {
  460.         return $this->infoPratique;
  461.     }
  462.     public function setInfoPratique(?string $infoPratique): self
  463.     {
  464.         $this->infoPratique $infoPratique;
  465.         return $this;
  466.     }
  467.     public function getAccessibiliteHandicap(): ?string
  468.     {
  469.         return $this->accessibiliteHandicap;
  470.     }
  471.     public function setAccessibiliteHandicap(?string $accessibiliteHandicap): self
  472.     {
  473.         $this->accessibiliteHandicap $accessibiliteHandicap;
  474.         return $this;
  475.     }
  476.     public function getAltVignette(): ?string
  477.     {
  478.         return $this->altVignette;
  479.     }
  480.     public function setAltVignette(?string $altVignette): self
  481.     {
  482.         $this->altVignette $altVignette;
  483.         return $this;
  484.     }
  485.     public function getDescription(): ?string
  486.     {
  487.         return $this->description;
  488.     }
  489.     public function setDescription(?string $description): self
  490.     {
  491.         $this->description $description;
  492.         return $this;
  493.     }
  494.     public function getModalitesDelaisAcces(): ?string
  495.     {
  496.         return $this->modalitesDelaisAcces;
  497.     }
  498.     public function setModalitesDelaisAcces(?string $modalitesDelaisAcces): self
  499.     {
  500.         $this->modalitesDelaisAcces $modalitesDelaisAcces;
  501.         return $this;
  502.     }
  503.     public function getAltBanniere(): ?string
  504.     {
  505.         return $this->altBanniere;
  506.     }
  507.     public function setAltBanniere(?string $altBanniere): self
  508.     {
  509.         $this->altBanniere $altBanniere;
  510.         return $this;
  511.     }
  512.     public function getIdentifiantDokelio(): ?string
  513.     {
  514.         return $this->identifiantDokelio;
  515.     }
  516.     public function setIdentifiantDokelio(?string $identifiantDokelio): self
  517.     {
  518.         $this->identifiantDokelio $identifiantDokelio;
  519.         return $this;
  520.     }
  521.     public function isPublication(): ?bool
  522.     {
  523.         return $this->publication;
  524.     }
  525.     public function setPublication(?bool $publication): self
  526.     {
  527.         $this->publication $publication;
  528.         return $this;
  529.     }
  530.     public function getContenuApres(): ?string
  531.     {
  532.         return $this->contenuApres;
  533.     }
  534.     public function setContenuApres(?string $contenuApres): self
  535.     {
  536.         $this->contenuApres $contenuApres;
  537.         return $this;
  538.     }
  539.     public function getModalitepedagogiques(): ?string
  540.     {
  541.         return $this->modalitepedagogiques;
  542.     }
  543.     public function setModalitepedagogiques(?string $modalitepedagogiques): self
  544.     {
  545.         $this->modalitepedagogiques $modalitepedagogiques;
  546.         return $this;
  547.     }
  548.     public function getStatistiques(): ?string
  549.     {
  550.         return $this->statistiques;
  551.     }
  552.     public function setStatistiques(?string $statistiques): self
  553.     {
  554.         $this->statistiques $statistiques;
  555.         return $this;
  556.     }
  557.     public function getModaliteevaluationinitial(): ?string
  558.     {
  559.         return $this->modaliteevaluationinitial;
  560.     }
  561.     public function setModaliteevaluationinitial(?string $modaliteevaluationinitial): self
  562.     {
  563.         $this->modaliteevaluationinitial $modaliteevaluationinitial;
  564.         return $this;
  565.     }
  566.     public function getModaliteevaluationfinal(): ?string
  567.     {
  568.         return $this->modaliteevaluationfinal;
  569.     }
  570.     public function setModaliteevaluationfinal(?string $modaliteevaluationfinal): self
  571.     {
  572.         $this->modaliteevaluationfinal $modaliteevaluationfinal;
  573.         return $this;
  574.     }
  575.     public function getContenuAvant(): ?string
  576.     {
  577.         return $this->contenuAvant;
  578.     }
  579.     public function setContenuAvant(?string $contenuAvant): self
  580.     {
  581.         $this->contenuAvant $contenuAvant;
  582.         return $this;
  583.     }
  584.     /**
  585.      * @return Collection<int, BlocModule>
  586.      */
  587.     public function getBlocModules(): Collection
  588.     {
  589.         return $this->blocModules;
  590.     }
  591.     public function setBlocModules(Collection $blocModules): self
  592.     {
  593.         $this->blocModules $blocModules;
  594.         return $this;
  595.     }
  596.     public function addBlocModule(BlocModule $blocModule): self
  597.     {
  598.         if (!$this->blocModules->contains($blocModule)) {
  599.             $this->blocModules->add($blocModule);
  600.             $blocModule->setModule($this);
  601.         }
  602.         return $this;
  603.     }
  604.     public function removeBlocModule(BlocModule $blocModule): self
  605.     {
  606.         // set the owning side to null (unless already changed)
  607.         if ($this->blocModules->removeElement($blocModule) && $blocModule->getModule() === $this) {
  608.             $blocModule->setModule(null);
  609.         }
  610.         return $this;
  611.     }
  612.     /**
  613.      * @return Collection<int, Chapitre>
  614.      */
  615.     public function getChapitres(): Collection
  616.     {
  617.         return $this->chapitres;
  618.     }
  619.     public function setChapitres(Collection $chapitres): self
  620.     {
  621.         $this->chapitres $chapitres;
  622.         return $this;
  623.     }
  624.     public function addChapitre(Chapitre $chapitre): self
  625.     {
  626.         if (!$this->chapitres->contains($chapitre)) {
  627.             $this->chapitres->add($chapitre);
  628.             $chapitre->setModule($this);
  629.         }
  630.         return $this;
  631.     }
  632.     public function removeChapitre(Chapitre $chapitre): self
  633.     {
  634.         // set the owning side to null (unless already changed)
  635.         if ($this->chapitres->removeElement($chapitre) && $chapitre->getModule() === $this) {
  636.             $chapitre->setModule(null);
  637.         }
  638.         return $this;
  639.     }
  640.     public function getModeFormation(): ?Masterlistelg
  641.     {
  642.         return $this->modeFormation;
  643.     }
  644.     public function setModeFormation(?Masterlistelg $modeFormation): self
  645.     {
  646.         $this->modeFormation $modeFormation;
  647.         return $this;
  648.     }
  649.     /**
  650.      * @return Collection<int, Module>
  651.      */
  652.     public function getModulesExigeAvant(): Collection
  653.     {
  654.         return $this->modulesExigeAvant;
  655.     }
  656.     public function addModulesExigeAvant(Module $modulesExigeAvant): self
  657.     {
  658.         if (!$this->modulesExigeAvant->contains($modulesExigeAvant)) {
  659.             $this->modulesExigeAvant->add($modulesExigeAvant);
  660.         }
  661.         return $this;
  662.     }
  663.     public function removeModulesExigeAvant(Module $modulesExigeAvant): self
  664.     {
  665.         $this->modulesExigeAvant->removeElement($modulesExigeAvant);
  666.         return $this;
  667.     }
  668.     /**
  669.      * @return Collection<int, Module>
  670.      */
  671.     public function getModulesSouhaitableAvant(): Collection
  672.     {
  673.         return $this->modulesSouhaitableAvant;
  674.     }
  675.     public function addModulesSouhaitableAvant(Module $modulesSouhaitableAvant): self
  676.     {
  677.         if (!$this->modulesSouhaitableAvant->contains($modulesSouhaitableAvant)) {
  678.             $this->modulesSouhaitableAvant->add($modulesSouhaitableAvant);
  679.         }
  680.         return $this;
  681.     }
  682.     public function removeModulesSouhaitableAvant(Module $modulesSouhaitableAvant): self
  683.     {
  684.         $this->modulesSouhaitableAvant->removeElement($modulesSouhaitableAvant);
  685.         return $this;
  686.     }
  687.     /**
  688.      * @return Collection<int, Module>
  689.      */
  690.     public function getModulesConseilleApres(): Collection
  691.     {
  692.         return $this->modulesConseilleApres;
  693.     }
  694.     public function addModulesConseilleApre(Module $modulesConseilleApre): self
  695.     {
  696.         if (!$this->modulesConseilleApres->contains($modulesConseilleApre)) {
  697.             $this->modulesConseilleApres->add($modulesConseilleApre);
  698.         }
  699.         return $this;
  700.     }
  701.     public function removeModulesConseilleApre(Module $modulesConseilleApre): self
  702.     {
  703.         $this->modulesConseilleApres->removeElement($modulesConseilleApre);
  704.         return $this;
  705.     }
  706.     /**
  707.      * @return Collection<int, ModuleCompetence>
  708.      */
  709.     public function getModuleCompetences(): Collection
  710.     {
  711.         return $this->moduleCompetences;
  712.     }
  713.     public function setModuleCompetences(Collection $moduleCompetences): self
  714.     {
  715.         $this->moduleCompetences $moduleCompetences;
  716.         return $this;
  717.     }
  718.     public function addModuleCompetence(ModuleCompetence $moduleCompetence): self
  719.     {
  720.         if (!$this->moduleCompetences->contains($moduleCompetence)) {
  721.             $this->moduleCompetences->add($moduleCompetence);
  722.             $moduleCompetence->setModule($this);
  723.         }
  724.         return $this;
  725.     }
  726.     public function removeModuleCompetence(ModuleCompetence $moduleCompetence): self
  727.     {
  728.         // set the owning side to null (unless already changed)
  729.         if ($this->moduleCompetences->removeElement($moduleCompetence) && $moduleCompetence->getModule() === $this) {
  730.             $moduleCompetence->setModule(null);
  731.         }
  732.         return $this;
  733.     }
  734.     /**
  735.      * @return Collection<int, Financeur>
  736.      */
  737.     public function getFinanceurs(): Collection
  738.     {
  739.         return $this->financeurs;
  740.     }
  741.     public function addFinanceur(Financeur $financeur): self
  742.     {
  743.         if (!$this->financeurs->contains($financeur)) {
  744.             $this->financeurs->add($financeur);
  745.         }
  746.         return $this;
  747.     }
  748.     public function removeFinanceur(Financeur $financeur): self
  749.     {
  750.         $this->financeurs->removeElement($financeur);
  751.         return $this;
  752.     }
  753.     public function getBanniere(): ?Upload
  754.     {
  755.         return $this->banniere;
  756.     }
  757.     public function setBanniere(?Upload $banniere): self
  758.     {
  759.         $this->banniere $banniere;
  760.         return $this;
  761.     }
  762.     public function getVignette(): ?Upload
  763.     {
  764.         return $this->vignette;
  765.     }
  766.     public function setVignette(?Upload $vignette): self
  767.     {
  768.         $this->vignette $vignette;
  769.         return $this;
  770.     }
  771.     public function isPublie(): ?bool
  772.     {
  773.         return $this->publie;
  774.     }
  775.     public function isCertifiantes(): ?bool
  776.     {
  777.         return $this->certifiantes;
  778.     }
  779.     public function getTauxObtention(): ?string
  780.     {
  781.         return $this->tauxObtention;
  782.     }
  783.     public function setTauxObtention(?string $tauxObtention): self
  784.     {
  785.         $this->tauxObtention $tauxObtention;
  786.         return $this;
  787.     }
  788.     public function getTauxAbandon(): ?string
  789.     {
  790.         return $this->tauxAbandon;
  791.     }
  792.     public function setTauxAbandon(?string $tauxAbandon): self
  793.     {
  794.         $this->tauxAbandon $tauxAbandon;
  795.         return $this;
  796.     }
  797.     public function getTauxSatisfaction(): ?string
  798.     {
  799.         return $this->tauxSatisfaction;
  800.     }
  801.     public function setTauxSatisfaction(?string $tauxSatisfaction): self
  802.     {
  803.         $this->tauxSatisfaction $tauxSatisfaction;
  804.         return $this;
  805.     }
  806.     public function getTauxPourSuiteEtude(): ?string
  807.     {
  808.         return $this->tauxPourSuiteEtude;
  809.     }
  810.     public function setTauxPourSuiteEtude(?string $tauxPourSuiteEtude): self
  811.     {
  812.         $this->tauxPourSuiteEtude $tauxPourSuiteEtude;
  813.         return $this;
  814.     }
  815.     public function getTauxEmployabilite(): ?string
  816.     {
  817.         return $this->tauxEmployabilite;
  818.     }
  819.     public function setTauxEmployabilite(?string $tauxEmployabilite): self
  820.     {
  821.         $this->tauxEmployabilite $tauxEmployabilite;
  822.         return $this;
  823.     }
  824.     public function getSalaireMoyen(): ?string
  825.     {
  826.         return $this->salaireMoyen;
  827.     }
  828.     public function setSalaireMoyen(?string $salaireMoyen): self
  829.     {
  830.         $this->salaireMoyen $salaireMoyen;
  831.         return $this;
  832.     }
  833.     public function getNiveaumateriel(): ?Masterlistelg
  834.     {
  835.         return $this->niveaumateriel;
  836.     }
  837.     public function setNiveaumateriel(?Masterlistelg $niveaumateriel): self
  838.     {
  839.         $this->niveaumateriel $niveaumateriel;
  840.         return $this;
  841.     }
  842.     public function getNiveautechnique(): ?Masterlistelg
  843.     {
  844.         return $this->niveautechnique;
  845.     }
  846.     public function setNiveautechnique(?Masterlistelg $niveautechnique): self
  847.     {
  848.         $this->niveautechnique $niveautechnique;
  849.         return $this;
  850.     }
  851.     public function getAutoriteDelivranceCpf(): ?Masterlistelg
  852.     {
  853.         return $this->autoriteDelivranceCpf;
  854.     }
  855.     public function setAutoriteDelivranceCpf(?Masterlistelg $autoriteDelivranceCpf): self
  856.     {
  857.         $this->autoriteDelivranceCpf $autoriteDelivranceCpf;
  858.         return $this;
  859.     }
  860.     /**
  861.      * @return Collection<int, ModuleModaliteEvaluationFinale>
  862.      */
  863.     public function getModuleModaliteEvaluationFinales(): Collection
  864.     {
  865.         return $this->moduleModaliteEvaluationFinales;
  866.     }
  867.     public function setModuleModaliteEvaluationFinales(Collection $modulemodaliteevaluationfinales): self
  868.     {
  869.         $this->moduleModaliteEvaluationFinales $modulemodaliteevaluationfinales;
  870.         return $this;
  871.     }
  872.     public function addModuleModaliteEvaluationFinales(ModuleModaliteEvaluationFinale $moduleModaliteEvaluationFinale): self
  873.     {
  874.         if (!$this->moduleModaliteEvaluationFinales->contains($moduleModaliteEvaluationFinale)) {
  875.             $this->moduleModaliteEvaluationFinales->add($moduleModaliteEvaluationFinale);
  876.             $moduleModaliteEvaluationFinale->setModule($this);
  877.         }
  878.         return $this;
  879.     }
  880.     public function removeModuleModaliteEvaluationFinales(ModuleModaliteEvaluationFinale $moduleModaliteEvaluationFinale): self
  881.     {
  882.         // set the owning side to null (unless already changed)
  883.         if ($this->moduleModaliteEvaluationFinales->removeElement($moduleModaliteEvaluationFinale) && $moduleModaliteEvaluationFinale->getModule() === $this) {
  884.             $moduleModaliteEvaluationFinale->setModule(null);
  885.         }
  886.         return $this;
  887.     }
  888.     public function getNbrsessioninter(): ?int
  889.     {
  890.         return $this->nbrsessioninter;
  891.     }
  892.     public function setNbrsessioninter(?int $nbrsessioninter): self
  893.     {
  894.         $this->nbrsessioninter $nbrsessioninter;
  895.         return $this;
  896.     }
  897.     public function getNbrsessionintra(): ?int
  898.     {
  899.         return $this->nbrsessionintra;
  900.     }
  901.     public function setNbrsessionintra(?int $nbrsessionintra): self
  902.     {
  903.         $this->nbrsessionintra $nbrsessionintra;
  904.         return $this;
  905.     }
  906.     public function getIsDefault(): ?bool
  907.     {
  908.         return $this->isDefault;
  909.     }
  910.     public function setIsDefault(?bool $isDefault): self
  911.     {
  912.         $this->isDefault $isDefault;
  913.         return $this;
  914.     }
  915.     public function isIsDefault(): ?bool
  916.     {
  917.         return $this->isDefault;
  918.     }
  919.     public function addModulemodaliteevaluationfinale(ModuleModaliteEvaluationFinale $modulemodaliteevaluationfinale): self
  920.     {
  921.         if (!$this->moduleModaliteEvaluationFinales->contains($modulemodaliteevaluationfinale)) {
  922.             $this->moduleModaliteEvaluationFinales->add($modulemodaliteevaluationfinale);
  923.             $modulemodaliteevaluationfinale->setModule($this);
  924.         }
  925.         return $this;
  926.     }
  927.     public function removeModulemodaliteevaluationfinale(ModuleModaliteEvaluationFinale $modulemodaliteevaluationfinale): self
  928.     {
  929.         // set the owning side to null (unless already changed)
  930.         if ($this->moduleModaliteEvaluationFinales->removeElement($modulemodaliteevaluationfinale) && $modulemodaliteevaluationfinale->getModule() === $this) {
  931.             $modulemodaliteevaluationfinale->setModule(null);
  932.         }
  933.         return $this;
  934.     }
  935.     /**
  936.      * @return Collection<int, FormateurModule>
  937.      */
  938.     public function getFormateurModules(): Collection
  939.     {
  940.         return $this->formateurModules;
  941.     }
  942.     public function addFormateurModule(FormateurModule $formateurModule): self
  943.     {
  944.         if (!$this->formateurModules->contains($formateurModule)) {
  945.             $this->formateurModules->add($formateurModule);
  946.             $formateurModule->setModule($this);
  947.         }
  948.         return $this;
  949.     }
  950.     public function removeFormateurModule(FormateurModule $formateurModule): self
  951.     {
  952.         // set the owning side to null (unless already changed)
  953.         if ($this->formateurModules->removeElement($formateurModule) && $formateurModule->getModule() === $this) {
  954.             $formateurModule->setModule(null);
  955.         }
  956.         return $this;
  957.     }
  958.     public function addTarifsVente(TarifVenteTheme $tarifsVente): self
  959.     {
  960.         if (!$this->tarifsVentes->contains($tarifsVente)) {
  961.             $this->tarifsVentes->add($tarifsVente);
  962.             $tarifsVente->setModule($this);
  963.         }
  964.         return $this;
  965.     }
  966.     public function removeTarifsVente(TarifVenteTheme $tarifsVente): self
  967.     {
  968.         // set the owning side to null (unless already changed)
  969.         if ($this->tarifsVentes->removeElement($tarifsVente) && $tarifsVente->getModule() === $this) {
  970.             $tarifsVente->setModule(null);
  971.         }
  972.         return $this;
  973.     }
  974.     public function addTarifsVenteIntra(TarifVenteThemeIntra $tarifsVenteIntra): self
  975.     {
  976.         if (!$this->tarifsVenteIntras->contains($tarifsVenteIntra)) {
  977.             $this->tarifsVenteIntras->add($tarifsVenteIntra);
  978.             $tarifsVenteIntra->setModuleIntra($this);
  979.         }
  980.         return $this;
  981.     }
  982.     public function removeTarifsVenteIntra(TarifVenteThemeIntra $tarifsVenteIntra): self
  983.     {
  984.         // set the owning side to null (unless already changed)
  985.         if ($this->tarifsVenteIntras->removeElement($tarifsVenteIntra) && $tarifsVenteIntra->getModuleIntra() === $this) {
  986.             $tarifsVenteIntra->setModuleIntra(null);
  987.         }
  988.         return $this;
  989.     }
  990.     public function getApiGestiform(): ?ApiGestiform
  991.     {
  992.         return $this->apiGestiform;
  993.     }
  994.     public function setApiGestiform(?ApiGestiform $apiGestiform): self
  995.     {
  996.         $this->apiGestiform $apiGestiform;
  997.         return $this;
  998.     }
  999.     
  1000.         //Tarif Inter
  1001.         public function getTarifInterActuel(?float $valeur null,\DateTimeInterface $dateDuJour null): float|int|null
  1002.         {
  1003.             if ($this instanceof Certification) {
  1004.             return $this->getTarifVente();
  1005.             }
  1006.             $dateDuJour = ($dateDuJour ?? new \DateTimeImmutable())
  1007.                     ->setTime(00);
  1008.         // 1. Vérifier les tarifs locaux
  1009.         foreach ($this->getTarifsVentes() ?? [] as $tarif) {
  1010.             $start $tarif->getStart();
  1011.             $end   $tarif->getEnd();
  1012.             if ($start <= $dateDuJour && ($end === null || $end >= $dateDuJour)) {
  1013.                 $result $this->calculeTarif($tarif$valeur ?? null);
  1014.                 if ($result !== null) {
  1015.                     return $result// trouvé + calcul ok
  1016.                 }
  1017.             }
  1018.         }
  1019.         // 2. Vérifier le tarif du thème
  1020.         $themeTarif $this->getThemeTarif()?->getTarifVenteActuel($dateDuJour);
  1021.         if ($themeTarif) {
  1022.             $result $this->calculeTarif($themeTarif$valeur);
  1023.             if ($result !== null) {
  1024.                 return $result;
  1025.             }
  1026.         }
  1027.         // 3. Vérifier tarif du sous-thème
  1028.         $sousThemeTarif $this->getSousThemeTheme()?->getTheme()?->getTarifVenteActuel($dateDuJour);
  1029.         if ($sousThemeTarif) {
  1030.             $result $this->calculeTarif($sousThemeTarif$valeur);
  1031.             if ($result !== null) {
  1032.                 return $result;
  1033.             }
  1034.         }
  1035.         // 4. Vérifier tarif par Defaut
  1036.         $defautTarif $this->getSousThemeTheme()?->getTheme()?->getTarifVenteDefaut();
  1037.         if ($defautTarif) {
  1038.             $result $this->calculeTarif($defautTarif$valeur);
  1039.             if ($result !== null) {
  1040.                 return $result;
  1041.             }
  1042.         }
  1043.         return null;
  1044.         }
  1045.         public function calculeTarif($tarifActuel, ?float $valeur null): float|int|null
  1046.         {
  1047.             $duree $this->duree 60// durée en heures
  1048.             $isTarifJour $tarifActuel->isTarifJour();
  1049.             // Détermine la valeur si non fournie
  1050.             $valeur ??= ($isTarifJour $duree $duree);
  1051.             foreach ($tarifActuel->getLignes() as $ligne) {
  1052.                 $min   $ligne->getValeurmin();
  1053.                 $max   $ligne->getValeurmax();
  1054.                 // Cas spécial : Tarif jour -> match uniquement si valeur exacte
  1055.                 if ($isTarifJour && $min === $valeur) {
  1056.                     return $ligne->getTarif() * $valeur;
  1057.                 }
  1058.                 // Cas normal : intervalle min/max
  1059.                 if (!$isTarifJour && $valeur >= $min && $valeur <= $max) {
  1060.                     return $ligne->getTarif() * $valeur;
  1061.                 }
  1062.             }
  1063.             return null;
  1064.         }
  1065.             public function getTarifVenteActuel(?\DateTimeInterface $dateDuJour null): ?TarifVenteTheme
  1066.         {
  1067.             $dateDuJour = ($dateDuJour ?? new \DateTimeImmutable())
  1068.                 ->setTime(00);
  1069.             foreach ($this->getTarifsVentes() ?? [] as $tarif) {
  1070.                 $start $tarif->getStart();
  1071.                 $end   $tarif->getEnd();
  1072.                 if ($start <= $dateDuJour && ($end === null || $end >= $dateDuJour)) {
  1073.                     return $tarif;
  1074.                 }
  1075.             }
  1076.             return $this->getThemeTarif()?->getTarifVenteActuel($dateDuJour)
  1077.                 ?? $this->getSousThemeTheme()?->getTheme()?->getTarifVenteActuel($dateDuJour)
  1078.                 ?? null;
  1079.         }
  1080.     /**
  1081.      * @return Collection<int, TarifVenteTheme>
  1082.      */
  1083.     public function getTarifsVentes(): Collection
  1084.     {
  1085.         return $this->tarifsVentes;
  1086.     }
  1087.     public function getThemeTarif(): ?Theme
  1088.     {
  1089.         return $this->themeTarif;
  1090.     }
  1091.     public function setThemeTarif(?Theme $themeTarif): self
  1092.     {
  1093.         $this->themeTarif $themeTarif;
  1094.         return $this;
  1095.     }
  1096.     public function getSousThemeTheme(): ?SousThemeTheme
  1097.     {
  1098.         return $this->sousThemeTheme;
  1099.     }
  1100.     public function setSousThemeTheme(?SousThemeTheme $sousThemeTheme): self
  1101.     {
  1102.         $this->sousThemeTheme $sousThemeTheme;
  1103.         return $this;
  1104.     }
  1105.     public function getOrigineTarifInter(): int
  1106.     {
  1107.         $tarif $this->getTarifVenteActuel();
  1108.         if (!$tarif) {
  1109.             return 0;
  1110.         }
  1111.         return match (true) {
  1112.             $tarif->getModule() !== null => 3,
  1113.             $tarif->getTheme()  !== null => 2,
  1114.             $tarif->getTarifDefaut() === null => 1,
  1115.             default => 0,
  1116.         };
  1117.     }
  1118.     public function getOrigineTarifIntra(): int
  1119.     {
  1120.         $tarif $this->getTarifVenteIntraActuel();
  1121.         if (!$tarif) {
  1122.             return 0;
  1123.         }
  1124.         return match (true) {
  1125.             $tarif->getModule() !== null => 3,
  1126.             $tarif->getTheme()  !== null => 2,
  1127.             $tarif->getTarifDefaut() === null => 1,
  1128.             default => 0,
  1129.         };
  1130.     }
  1131.     // 0 -> ne sait pas
  1132.     // 1 -> tarif défaut
  1133.     // 2 -> thème
  1134.     // 3 -> module
  1135.         public function getTarifVenteIntraActuel(?\DateTimeInterface $dateDuJour null)
  1136.     {
  1137.         $dateDuJour = ($dateDuJour ?? new \DateTimeImmutable())
  1138.             ->setTime(00);
  1139.         foreach ($this->getTarifsVenteIntras() ?? [] as $tarif) {
  1140.             $start $tarif->getStart();
  1141.             $end   $tarif->getEnd();
  1142.             if ($start <= $dateDuJour && ($end === null || $end >= $dateDuJour)) {
  1143.                 return $tarif;
  1144.             }
  1145.         }
  1146.         // Fallback : tarif venant du thème
  1147.         return $this->getThemeTarif()?->getTarifVenteIntraActuel($dateDuJour)
  1148.             ?? null;
  1149.     }
  1150.     // 0 -> ne sait pas
  1151.     // 1 -> tarif défaut
  1152.     // 2 -> thème
  1153.     // 3 -> module
  1154.     /**
  1155.      * @return Collection<int, TarifVenteThemeIntra>
  1156.      */
  1157.     public function getTarifsVenteIntras(): Collection
  1158.     {
  1159.         return $this->tarifsVenteIntras;
  1160.     }
  1161.     public function getTarifVenteIntraOfActuelJour(?float $jour null): float|int|null
  1162.     {
  1163.         $jour ??= (($this->duree ?? 0) / 60) / 7;
  1164.         $tarifIntra $this->getTarifVenteIntraActuel();
  1165.         if (!$tarifIntra) {
  1166.             return null;
  1167.         }
  1168.         if (!$tarifIntra instanceof TarifVenteThemeIntra) {
  1169.             return null;
  1170.         }
  1171.         foreach ($tarifIntra->getIntraJourOfs() ?? [] as $ligne) {
  1172.             if ($ligne->getJour() === $jour) {
  1173.                 return $ligne->getTarif() * $jour;
  1174.             }
  1175.         }
  1176.         return null;
  1177.     }
  1178.     public function getTarifVenteIntraClientActuelJour(?float $jour null): float|int|null
  1179.     {
  1180.         $jour ??= (($this->duree ?? 0) / 60) / 7;
  1181.         $tarifIntra $this->getTarifVenteIntraActuel();
  1182.         if (!$tarifIntra instanceof TarifVenteThemeIntra) {
  1183.             return null;
  1184.         }
  1185.         foreach ($tarifIntra->getIntraJourClients() ?? [] as $ligne) {
  1186.             if ($ligne->getJour() === $jour) {
  1187.                 return $ligne->getTarif() * $jour;
  1188.             }
  1189.         }
  1190.         return null;
  1191.     }
  1192.     public function getTarifVenteIntraOfActuelJourPourDate(?\DateTimeInterface $dateDuJour null, ?float $jour null): float|int|null
  1193.     {
  1194.         $jour ??= (($this->duree ?? 0) / 60) / 7;
  1195.         $tarifIntra $this->getTarifVenteIntraActuel($dateDuJour);
  1196.         if (!$tarifIntra instanceof TarifVenteThemeIntra) {
  1197.             return null;
  1198.         }
  1199.         foreach ($tarifIntra->getIntraJourOfs() ?? [] as $ligne) {
  1200.             if ($ligne->getJour() === $jour) {
  1201.                 return $ligne->getTarif() * $jour;
  1202.             }
  1203.         }
  1204.         return null;
  1205.     }
  1206.     public function getTarifVenteIntraClientActuelJourPourDate(?\DateTimeInterface $dateDuJour null, ?float $jour null): float|int|null
  1207.     {
  1208.         $jour ??= (($this->duree ?? 0) / 60) / 7;
  1209.         $tarifIntra $this->getTarifVenteIntraActuel($dateDuJour);
  1210.         if (!$tarifIntra instanceof TarifVenteThemeIntra) {
  1211.             return null;
  1212.         }
  1213.         foreach ($tarifIntra->getIntraJourClients() ?? [] as $ligne) {
  1214.             if ($ligne->getJour() === $jour) {
  1215.                 return $ligne->getTarif() * $jour;
  1216.             }
  1217.         }
  1218.         return null;
  1219.     }
  1220.     public function getEvents(): Collection
  1221.     {
  1222.         return $this->events;
  1223.     }
  1224.     public function addEvent(Event $event): self
  1225.     {
  1226.         if (!$this->events->contains($event)) {
  1227.             $this->events->add($event);
  1228.             $event->setModule($this);
  1229.         }
  1230.         return $this;
  1231.     }
  1232.     public function removeEvent(Event $event): self
  1233.     {
  1234.         // set the owning side to null (unless already changed)
  1235.         if ($this->events->removeElement($event) && $event->getModule() === $this) {
  1236.             $event->setModule(null);
  1237.         }
  1238.         return $this;
  1239.     }
  1240.     /**
  1241.      * @return Collection<int, Certification>
  1242.      */
  1243.     public function getCertifications(): Collection
  1244.     {
  1245.         return $this->certifications;
  1246.     }
  1247.     public function setCertifications(Collection $certifications): self
  1248.     {
  1249.         $this->certifications $certifications;
  1250.         return $this;
  1251.     }
  1252.     public function addCertification(Certification $certification): self
  1253.     {
  1254.         if (!$this->certifications->contains($certification)) {
  1255.             $this->certifications->add($certification);
  1256.         }
  1257.         return $this;
  1258.     }
  1259.     public function removeCertification(Certification $certification): self
  1260.     {
  1261.         $this->certifications->removeElement($certification);
  1262.         return $this;
  1263.     }
  1264.     public function getFullIntituleType(): string
  1265.     {
  1266.         $type $this instanceof Certification 'certification' 'module';
  1267.         return $this->intitule ' (' $type ')';
  1268.     }
  1269.     public function getType(): string
  1270.     {
  1271.      return $this instanceof Certification 'certification' 'module';
  1272.     }
  1273.     /**
  1274.      * @return Collection<int, Document>
  1275.      */
  1276.     public function getDocuments(): Collection
  1277.     {
  1278.         return $this->documents;
  1279.     }
  1280.     public function addDocument(Document $document): self
  1281.     {
  1282.         if (!$this->documents->contains($document)) {
  1283.             $this->documents->add($document);
  1284.             $document->setModule($this);
  1285.         }
  1286.         return $this;
  1287.     }
  1288.     public function removeDocument(Document $document): self
  1289.     {
  1290.         // set the owning side to null (unless already changed)
  1291.         if ($this->documents->removeElement($document) && $document->getModule() === $this) {
  1292.             $document->setModule(null);
  1293.         }
  1294.         return $this;
  1295.     }
  1296. }