From 04c43a12dafb9e5a6b29d21217e46410edbcf4b9 Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 00:15:51 +0200 Subject: [PATCH] Add new event NEWSLETTER_UNSUBSCRIBE --- core/lib/Thelia/Action/Newsletter.php | 8 +++++++- core/lib/Thelia/Core/Event/TheliaEvents.php | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Action/Newsletter.php b/core/lib/Thelia/Action/Newsletter.php index fa2e54f09..905cf48b0 100644 --- a/core/lib/Thelia/Action/Newsletter.php +++ b/core/lib/Thelia/Action/Newsletter.php @@ -49,6 +49,11 @@ class Newsletter extends BaseAction implements EventSubscriberInterface ->save(); } + public function unsubscribe(NewsletterEvent $event) + { + // TODO + } + /** * Returns an array of event names this subscriber wants to listen to. * @@ -72,7 +77,8 @@ class Newsletter extends BaseAction implements EventSubscriberInterface public static function getSubscribedEvents() { return array( - TheliaEvents::NEWSLETTER_SUBSCRIBE => array('subscribe', 128) + TheliaEvents::NEWSLETTER_SUBSCRIBE => array('subscribe', 128), + TheliaEvents::NEWSLETTER_UNSUBSCRIBE => array('unsubscribe', 128) ); } } \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index 731c03f23..6c44638d7 100755 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -71,6 +71,11 @@ final class TheliaEvents */ const CUSTOMER_UPDATEACCOUNT = "action.updateCustomer"; + /** + * sent on customer account update profil + */ + const CUSTOMER_UPDATEPROFIL = "action.updateProfilCustomer"; + /** * sent on customer removal */ @@ -686,4 +691,9 @@ final class TheliaEvents * sent for subscribing to the newsletter */ const NEWSLETTER_SUBSCRIBE = 'thelia.newsletter.subscribe'; + + /** + * sent for subscribing to the newsletter + */ + const NEWSLETTER_UNSUBSCRIBE = 'thelia.newsletter.unsubscribe'; }