コード例 #1
0
 protected function subscribe()
 {
     $rmb = new Custom_Newsletter_Resubscription_Message_Builder();
     $nsm = new Newsletter_Subscription_Manager();
     $nsm->setResubscriptionMessageBuilder($rmb);
     $email = $this->getFirstElementValueNonDefault('email');
     $this->_subscription_result = $nsm->subscribe(NULL, $email);
     $this->_status = $this->_subscription_result === Newsletter_Subscription_Manager::SUBSCRIBED ? self::SUCCESS : self::FAILURE;
 }