Loading module/Application/src/Application/Controller/TheseController.php +31 −22 Changes for module/Application/src/Application/Controller/TheseController.php: 31 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ use Application\Form\MetadonneeTheseForm; use Application\Form\PointsDeVigilanceForm; use Application\Form\RdvBuTheseDoctorantForm; use Application\Form\RdvBuTheseForm; use Application\Rule\SuppressionAttestationsRequiseRule; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\FichierThese\Exception\ValidationImpossibleException; use Application\Service\FichierThese\FichierTheseServiceAwareTrait; Loading Loading @@ -1042,6 +1043,15 @@ class TheseController extends AbstractController return $view; } private function isEtapeAttestationVisible(These $these, VersionFichier $version) { $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); return $version->estVersionCorrigee() && $versionCorrigeeAtteignable || !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; } public function attestationAction() { $these = $this->requestedThese(); Loading @@ -1049,17 +1059,9 @@ class TheseController extends AbstractController $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); // Est-ce vraiment indispensable d'interroger le moteur du WF ? // Mis en commentaire pour accélerer l'affichage... // $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); // $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); // $visible = // $version->estVersionCorrigee() && $versionCorrigeeAtteignable || // !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; // // if (! $visible) { // return false; // } if (! $this->isEtapeAttestationVisible($these, $version)) { return false; } if (! $hasFichierThese) { return false; } Loading Loading @@ -1169,23 +1171,24 @@ class TheseController extends AbstractController return $this->existeVersionCorrigee; } private function isEtapeDiffusionVisible(These $these, VersionFichier $version) { $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); return $version->estVersionCorrigee() && $versionCorrigeeAtteignable || !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; } public function diffusionAction() { $these = $this->requestedThese(); $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); // Est-ce vraiment indispensable d'interroger le moteur du WF ? // Mis en commentaire pour accélerer l'affichage... // $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); // $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); // $visible = // $version->estVersionCorrigee() && $versionCorrigeeAtteignable || // !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; // // if (! $visible) { // return false; // } if (! $this->isEtapeDiffusionVisible($these, $version)) { return false; } if (! $hasFichierThese) { return false; } Loading Loading @@ -1239,6 +1242,11 @@ class TheseController extends AbstractController $form = $this->getDiffusionForm($version); /** @var Diffusion $diffusion */ $diffusion = $form->getObject(); $isUpdate = $diffusion->getId() !== null; if ($this->getRequest()->isPost()) { /** @var ParametersInterface $post */ $post = $this->getRequest()->getPost(); Loading @@ -1247,6 +1255,7 @@ class TheseController extends AbstractController if ($isValid) { /** @var Diffusion $diffusion */ $diffusion = $form->getData(); $this->theseService->updateDiffusion($these, $diffusion); // suppression des fichiers expurgés éventuellement déposés en l'absence de pb de droit d'auteur Loading module/Application/src/Application/Entity/Db/Diffusion.php +9 −9 Changes for module/Application/src/Application/Entity/Db/Diffusion.php: 9 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ class Diffusion implements HistoriqueAwareInterface const CONFIDENTIELLE_OUI = '1'; const CONFIDENTIELLE_NON = '0'; const AUTORISATION_OUI_IMMEDIAT = '2'; const AUTORISATION_OUI_EMBARGO = '1'; const AUTORISATION_NON = '0'; const AUTORISATION_OUI_IMMEDIAT = 2; const AUTORISATION_OUI_EMBARGO = 1; const AUTORISATION_NON = 0; const EMBARGO_DUREE_6_MOIS = '6 mois'; const EMBARGO_DUREE_1_AN = '1 an'; Loading Loading @@ -99,7 +99,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getConfidentielle() { return $this->confidentielle; return (bool) $this->confidentielle; } /** Loading @@ -108,7 +108,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setConfidentielle($confidentielle) { $this->confidentielle = $confidentielle; $this->confidentielle = (bool) $confidentielle; return $this; } Loading Loading @@ -149,7 +149,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setDroitAuteurOk($droitAuteurOk = true) { $this->droitAuteurOk = $droitAuteurOk; $this->droitAuteurOk = (bool) $droitAuteurOk; return $this; } Loading @@ -161,7 +161,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getDroitAuteurOk() { return $this->droitAuteurOk; return (bool) $this->droitAuteurOk; } /** Loading @@ -169,7 +169,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getCertifCharteDiff() { return $this->certifCharteDiff; return (bool) $this->certifCharteDiff; } /** Loading @@ -178,7 +178,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setCertifCharteDiff($certifCharteDiff) { $this->certifCharteDiff = $certifCharteDiff; $this->certifCharteDiff = (bool) $certifCharteDiff; return $this; } Loading module/Application/src/Application/Form/DiffusionTheseForm.php +0 −3 Changes for module/Application/src/Application/Form/DiffusionTheseForm.php: 0 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -281,9 +281,6 @@ class DiffusionTheseForm extends Form $autorisMel = $this->get('autorisMel')->getValue(); switch ($autorisMel) { case null: $required['autorisEmbargoDuree'] = false; $required['autorisMotif'] = false; break; case Diffusion::AUTORISATION_OUI_IMMEDIAT: $required['autorisEmbargoDuree'] = false; $required['autorisMotif'] = false; Loading module/Application/src/Application/Rule/AutorisationDiffusionRule.php 0 → 100644 +97 −0 Changes for module/Application/src/Application/Rule/AutorisationDiffusionRule.php: 97 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Rule; use Application\Entity\Db\Diffusion; use Doctrine\ORM\EntityManager; /** * Règle métier concernant la remise d'une version papier de la thèse. * * @author Unicaen */ class AutorisationDiffusionRule implements RuleInterface { /** * @var Diffusion */ private $diffusion; /** * @param Diffusion $diffusion * @return self */ public function setDiffusion(Diffusion $diffusion): self { $this->diffusion = $diffusion; return $this; } /** * @return self */ public function execute(): self { // rien n'est fait ici return $this; } /** * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. * * @return bool */ public function computeRemiseExemplairePapierEstRequise(): bool { return $this->autorisMelEntraineRemiseExemplairePapier($this->diffusion->getAutorisMel()); } /** * Détermine si la réponse à l'autorisation de diffusion (NON ENCORE ENREGISTRÉE) a changé de manière "importante", * càd si elle est passée * de "Oui" à "Oui+Embargo" ou "Non", * ou * de "Oui+Embargo" ou "Non" à "Oui". * * ATTENTION: cette méthode ne peut être appelée qu'avant le flush de l'entity manager. * * @param EntityManager $entityManager * @return bool */ public function computeChangementDeReponseImportant(EntityManager $entityManager): bool { $metadata = $entityManager->getClassMetadata(Diffusion::class); $uow = $entityManager->getUnitOfWork(); $uow->recomputeSingleEntityChangeSet($metadata, $this->diffusion); $changeset = $uow->getEntityChangeSet($this->diffusion); if (isset($changeset['autorisMel'])) { $oldValue = $changeset['autorisMel'][0]; $newValue = $changeset['autorisMel'][1]; return $this->autorisMelEntraineRemiseExemplairePapier($oldValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($newValue) || $this->autorisMelEntraineRemiseExemplairePapier($newValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($oldValue); } return false; } /** * Teste si la réponse spécifiée à l'autorisation de diffusion entraîne ou non la nécessité de remettre * une version imprimée de la thèse. * * @param int $autorisMel * @return bool */ private function autorisMelEntraineRemiseExemplairePapier($autorisMel): bool { if ($autorisMel === Diffusion::AUTORISATION_OUI_EMBARGO || $autorisMel === Diffusion::AUTORISATION_NON) { return true; } else { return false; } } } No newline at end of file module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php 0 → 100644 +81 −0 Changes for module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php: 81 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Rule; use Application\Entity\Db\These; /** * Règle déterminant s'il est nécessaire de supprimer les réponses aux "attestations" selon les réponses * à l'autorisation de diffusion. * * Supprimer les réponses aux attestations permet de redemander à l'utilisateur d'y répondre à nouveau. * * @author Unicaen */ class SuppressionAttestationsRequiseRule implements RuleInterface { /** * @var These */ private $these; /** * @var bool */ private $estRequise; /** * @param These $these * @return self */ public function setThese($these) { $this->these = $these; return $this; } /** * @return self */ public function execute() { // rien n'est fait ici return $this; } /** * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. * * @return bool */ public function computeEstRequise(): bool { $attestation = $this->these->getAttestation(); if ($attestation === null) { // aucune attestation remplie : suppression inutile return false; } $rule = new AutorisationDiffusionRule(); $rule->setDiffusion($this->these->getDiffusion()); $rule->execute(); $remisePapierRequise = $rule->computeRemiseExemplairePapierEstRequise(); if ($remisePapierRequise) { if (! $attestation->isExemplaireImprimeConformeAVersionDeposee()) { // la question "exemplaire papier conforme" n'a pas été posée, il faudra la poser : suppression return true; } } else { if ($attestation->isExemplaireImprimeConformeAVersionDeposee()) { // la question "exemplaire papier conforme" n'a pas été posée, il faudra la poser : suppression return true; } } return false; } } No newline at end of file Loading
module/Application/src/Application/Controller/TheseController.php +31 −22 Changes for module/Application/src/Application/Controller/TheseController.php: 31 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ use Application\Form\MetadonneeTheseForm; use Application\Form\PointsDeVigilanceForm; use Application\Form\RdvBuTheseDoctorantForm; use Application\Form\RdvBuTheseForm; use Application\Rule\SuppressionAttestationsRequiseRule; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\FichierThese\Exception\ValidationImpossibleException; use Application\Service\FichierThese\FichierTheseServiceAwareTrait; Loading Loading @@ -1042,6 +1043,15 @@ class TheseController extends AbstractController return $view; } private function isEtapeAttestationVisible(These $these, VersionFichier $version) { $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); return $version->estVersionCorrigee() && $versionCorrigeeAtteignable || !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; } public function attestationAction() { $these = $this->requestedThese(); Loading @@ -1049,17 +1059,9 @@ class TheseController extends AbstractController $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); // Est-ce vraiment indispensable d'interroger le moteur du WF ? // Mis en commentaire pour accélerer l'affichage... // $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS)->getAtteignable(); // $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_ATTESTATIONS_VERSION_CORRIGEE)->getAtteignable(); // $visible = // $version->estVersionCorrigee() && $versionCorrigeeAtteignable || // !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; // // if (! $visible) { // return false; // } if (! $this->isEtapeAttestationVisible($these, $version)) { return false; } if (! $hasFichierThese) { return false; } Loading Loading @@ -1169,23 +1171,24 @@ class TheseController extends AbstractController return $this->existeVersionCorrigee; } private function isEtapeDiffusionVisible(These $these, VersionFichier $version) { $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); return $version->estVersionCorrigee() && $versionCorrigeeAtteignable || !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; } public function diffusionAction() { $these = $this->requestedThese(); $version = $this->fichierTheseService->fetchVersionFichier($this->params()->fromQuery('version')); $hasFichierThese = ! empty($this->fichierTheseService->getRepository()->fetchFichierTheses($these, NatureFichier::CODE_THESE_PDF, $version, false)); // Est-ce vraiment indispensable d'interroger le moteur du WF ? // Mis en commentaire pour accélerer l'affichage... // $versionInitialeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE)->getAtteignable(); // $versionCorrigeeAtteignable = $this->workflowService->findOneByEtape($these, WfEtape::CODE_AUTORISATION_DIFFUSION_THESE_VERSION_CORRIGEE)->getAtteignable(); // $visible = // $version->estVersionCorrigee() && $versionCorrigeeAtteignable || // !$version->estVersionCorrigee() && $versionInitialeAtteignable && !$versionCorrigeeAtteignable; // // if (! $visible) { // return false; // } if (! $this->isEtapeDiffusionVisible($these, $version)) { return false; } if (! $hasFichierThese) { return false; } Loading Loading @@ -1239,6 +1242,11 @@ class TheseController extends AbstractController $form = $this->getDiffusionForm($version); /** @var Diffusion $diffusion */ $diffusion = $form->getObject(); $isUpdate = $diffusion->getId() !== null; if ($this->getRequest()->isPost()) { /** @var ParametersInterface $post */ $post = $this->getRequest()->getPost(); Loading @@ -1247,6 +1255,7 @@ class TheseController extends AbstractController if ($isValid) { /** @var Diffusion $diffusion */ $diffusion = $form->getData(); $this->theseService->updateDiffusion($these, $diffusion); // suppression des fichiers expurgés éventuellement déposés en l'absence de pb de droit d'auteur Loading
module/Application/src/Application/Entity/Db/Diffusion.php +9 −9 Changes for module/Application/src/Application/Entity/Db/Diffusion.php: 9 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ class Diffusion implements HistoriqueAwareInterface const CONFIDENTIELLE_OUI = '1'; const CONFIDENTIELLE_NON = '0'; const AUTORISATION_OUI_IMMEDIAT = '2'; const AUTORISATION_OUI_EMBARGO = '1'; const AUTORISATION_NON = '0'; const AUTORISATION_OUI_IMMEDIAT = 2; const AUTORISATION_OUI_EMBARGO = 1; const AUTORISATION_NON = 0; const EMBARGO_DUREE_6_MOIS = '6 mois'; const EMBARGO_DUREE_1_AN = '1 an'; Loading Loading @@ -99,7 +99,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getConfidentielle() { return $this->confidentielle; return (bool) $this->confidentielle; } /** Loading @@ -108,7 +108,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setConfidentielle($confidentielle) { $this->confidentielle = $confidentielle; $this->confidentielle = (bool) $confidentielle; return $this; } Loading Loading @@ -149,7 +149,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setDroitAuteurOk($droitAuteurOk = true) { $this->droitAuteurOk = $droitAuteurOk; $this->droitAuteurOk = (bool) $droitAuteurOk; return $this; } Loading @@ -161,7 +161,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getDroitAuteurOk() { return $this->droitAuteurOk; return (bool) $this->droitAuteurOk; } /** Loading @@ -169,7 +169,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function getCertifCharteDiff() { return $this->certifCharteDiff; return (bool) $this->certifCharteDiff; } /** Loading @@ -178,7 +178,7 @@ class Diffusion implements HistoriqueAwareInterface */ public function setCertifCharteDiff($certifCharteDiff) { $this->certifCharteDiff = $certifCharteDiff; $this->certifCharteDiff = (bool) $certifCharteDiff; return $this; } Loading
module/Application/src/Application/Form/DiffusionTheseForm.php +0 −3 Changes for module/Application/src/Application/Form/DiffusionTheseForm.php: 0 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -281,9 +281,6 @@ class DiffusionTheseForm extends Form $autorisMel = $this->get('autorisMel')->getValue(); switch ($autorisMel) { case null: $required['autorisEmbargoDuree'] = false; $required['autorisMotif'] = false; break; case Diffusion::AUTORISATION_OUI_IMMEDIAT: $required['autorisEmbargoDuree'] = false; $required['autorisMotif'] = false; Loading
module/Application/src/Application/Rule/AutorisationDiffusionRule.php 0 → 100644 +97 −0 Changes for module/Application/src/Application/Rule/AutorisationDiffusionRule.php: 97 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Rule; use Application\Entity\Db\Diffusion; use Doctrine\ORM\EntityManager; /** * Règle métier concernant la remise d'une version papier de la thèse. * * @author Unicaen */ class AutorisationDiffusionRule implements RuleInterface { /** * @var Diffusion */ private $diffusion; /** * @param Diffusion $diffusion * @return self */ public function setDiffusion(Diffusion $diffusion): self { $this->diffusion = $diffusion; return $this; } /** * @return self */ public function execute(): self { // rien n'est fait ici return $this; } /** * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. * * @return bool */ public function computeRemiseExemplairePapierEstRequise(): bool { return $this->autorisMelEntraineRemiseExemplairePapier($this->diffusion->getAutorisMel()); } /** * Détermine si la réponse à l'autorisation de diffusion (NON ENCORE ENREGISTRÉE) a changé de manière "importante", * càd si elle est passée * de "Oui" à "Oui+Embargo" ou "Non", * ou * de "Oui+Embargo" ou "Non" à "Oui". * * ATTENTION: cette méthode ne peut être appelée qu'avant le flush de l'entity manager. * * @param EntityManager $entityManager * @return bool */ public function computeChangementDeReponseImportant(EntityManager $entityManager): bool { $metadata = $entityManager->getClassMetadata(Diffusion::class); $uow = $entityManager->getUnitOfWork(); $uow->recomputeSingleEntityChangeSet($metadata, $this->diffusion); $changeset = $uow->getEntityChangeSet($this->diffusion); if (isset($changeset['autorisMel'])) { $oldValue = $changeset['autorisMel'][0]; $newValue = $changeset['autorisMel'][1]; return $this->autorisMelEntraineRemiseExemplairePapier($oldValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($newValue) || $this->autorisMelEntraineRemiseExemplairePapier($newValue) && ! $this->autorisMelEntraineRemiseExemplairePapier($oldValue); } return false; } /** * Teste si la réponse spécifiée à l'autorisation de diffusion entraîne ou non la nécessité de remettre * une version imprimée de la thèse. * * @param int $autorisMel * @return bool */ private function autorisMelEntraineRemiseExemplairePapier($autorisMel): bool { if ($autorisMel === Diffusion::AUTORISATION_OUI_EMBARGO || $autorisMel === Diffusion::AUTORISATION_NON) { return true; } else { return false; } } } No newline at end of file
module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php 0 → 100644 +81 −0 Changes for module/Application/src/Application/Rule/SuppressionAttestationsRequiseRule.php: 81 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Rule; use Application\Entity\Db\These; /** * Règle déterminant s'il est nécessaire de supprimer les réponses aux "attestations" selon les réponses * à l'autorisation de diffusion. * * Supprimer les réponses aux attestations permet de redemander à l'utilisateur d'y répondre à nouveau. * * @author Unicaen */ class SuppressionAttestationsRequiseRule implements RuleInterface { /** * @var These */ private $these; /** * @var bool */ private $estRequise; /** * @param These $these * @return self */ public function setThese($these) { $this->these = $these; return $this; } /** * @return self */ public function execute() { // rien n'est fait ici return $this; } /** * Retourne un booléen indiquant si la remise d'un exemplaire papier est requise. * * @return bool */ public function computeEstRequise(): bool { $attestation = $this->these->getAttestation(); if ($attestation === null) { // aucune attestation remplie : suppression inutile return false; } $rule = new AutorisationDiffusionRule(); $rule->setDiffusion($this->these->getDiffusion()); $rule->execute(); $remisePapierRequise = $rule->computeRemiseExemplairePapierEstRequise(); if ($remisePapierRequise) { if (! $attestation->isExemplaireImprimeConformeAVersionDeposee()) { // la question "exemplaire papier conforme" n'a pas été posée, il faudra la poser : suppression return true; } } else { if ($attestation->isExemplaireImprimeConformeAVersionDeposee()) { // la question "exemplaire papier conforme" n'a pas été posée, il faudra la poser : suppression return true; } } return false; } } No newline at end of file