Commit fe6238c9 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'add-bu-notif-admission' into develop

parents d61da152 09c583a1
Loading
Loading
Loading
Loading
+2 −17
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
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
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);