public function editemailAction()
 {
     $proxy = new SxModule_Subscribe_Email_Proxy();
     $item = $proxy->getById((int) $this->_getParam('id'), $_SESSION['System']['lng']);
     if ($this->getRequest()->isPost()) {
         $mapper = new SxModule_Subscribe_Email_Mapper();
         $fields = $mapper->fromInput($this->_getAllParams(), $this->_editablefields());
         $data = $mapper->toObject($fields, $item);
         $data->setLng($_SESSION['System']['lng']);
         $validator = new SxModule_Subscribe_Email_Validator();
         if ($validator->validate($data)) {
             $data->save();
             $cache = Zend_Registry::get('cache');
             $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('SxModule_Subscribe'));
             $flashMessenger = $this->_helper->getHelper('FlashMessenger');
             $flashMessenger->addMessage($this->admin_tmx->_('itemcreated'));
             $this->_helper->redirector->gotoSimple('indexmail', 'subscribe');
         }
         $item = $data;
     }
     $this->view->messages = Sanmax_MessageStack::getInstance('SxModule_Subscribe');
     $this->view->item = $item;
 }
Esempio n. 2
0
 public function sendConfirmation($url)
 {
     $proxyMail = new SxModule_Subscribe_Email_Proxy();
     $mailInfo = $proxyMail->getById('3', $this->getLng());
     $this->_send($mailInfo, $url);
 }