Commit abab0322 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

(DONE) Ajout d'un prédicat These::estSoutenue()

parent 7cd6ad10
Loading
Loading
Loading
Loading
+11
Changes for module/Application/src/Application/Entity/Db/These.php: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1190,4 +1190,15 @@ class These implements HistoriqueAwareInterface, ResourceInterface
                throw new RuntimeException("Interval rencontré non prévu: " . $spec);
        }
    }

    /**
     * Predicat testant si une thèse est soutenue en utilisant la date du système
     * @return boolean
     */
    public function estSoutenue() {
        $maintenant = new DateTime();
        $soutenance = $this->getDateSoutenance();
        if ($maintenant > $soutenance) return true;
        return false;
    }
}