Add new event NEWSLETTER_UNSUBSCRIBE

This commit is contained in:
touffies
2013-10-24 00:15:51 +02:00
parent ac3e842662
commit 04c43a12da
2 changed files with 17 additions and 1 deletions

View File

@@ -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)
);
}
}

View File

@@ -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';
}