Commit 09c583a1 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Notif doctorant admis: ajout de la BU aux destinataires.

parent d61da152
Loading
Loading
Loading
Loading
+2 −17
Changes for module/Application/src/Application/Notification/ResultatTheseModifieNotification.php: 2 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@ class ResultatTheseModifieNotification extends Notification
     */
    public function prepare()
    {
        $this->setTo($this->emailBdd);
        // NB: les destinataires sont ajoutés en amont.

        $this->setSubject("Résultats de thèses modifiés");

        $this->setTemplateVariables([
@@ -43,20 +44,4 @@ class ResultatTheseModifieNotification extends Notification

        return $this;
    }

    /**
     * @var string
     */
    private $emailBdd;

    /**
     * @param string $emailBdd
     * @return self
     */
    public function setEmailBdd($emailBdd)
    {
        $this->emailBdd = $emailBdd;

        return $this;
    }
}
 No newline at end of file
+5 −2
Changes for module/Application/src/Application/Service/Notification/NotificationFactory.php: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -87,11 +87,14 @@ class NotificationFactory extends \Notification\Service\NotificationFactory
     */
    public function createNotificationForBdDUpdateResultat(array $data)
    {
        $emailBdd = $this->fetchEmailBdd(current($data)['these']);
        $these = current($data)['these'];

        $emailBdd = $this->fetchEmailBdd($these);
        $emailBu = $this->fetchEmailBu($these);

        $notif = new ResultatTheseModifieNotification();
        $notif->setData($data);
        $notif->setEmailBdd($emailBdd);
        $notif->setTo([$emailBdd, $emailBu]);

        //$this->trigger($notif);
        return $notif;
+5 −2
Changes for module/Application/src/Application/Service/Notification/NotifierService.php: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -71,11 +71,14 @@ class NotifierService extends \Notification\Service\NotifierService
     */
    public function triggerBdDUpdateResultat(array $data)
    {
        $emailBdd = $this->fetchEmailBdd(current($data)['these']);
        $these = current($data)['these'];

        $emailBdd = $this->fetchEmailBdd($these);
        $emailBu = $this->fetchEmailBu($these);

        $notif = new ResultatTheseModifieNotification();
        $notif->setData($data);
        $notif->setEmailBdd($emailBdd);
        $notif->setTo([$emailBdd, $emailBu]);

        $this->trigger($notif);