Пример #1
0
 public function render()
 {
     $sAction = $this->sAction;
     $this->oTemplate->replaceIdentifierCallback('renderLoginModule', function ($oTemplateIdentifier) use($sAction) {
         $aOptions = array(LoginFrontendModule::MODE_SELECT_KEY => $oTemplateIdentifier->getParameter('template'));
         $oLoginModule = new LoginFrontendModule(serialize($aOptions));
         return $oLoginModule->renderFrontend($sAction);
     }, null, Template::LEAVE_IDENTIFIERS);
     $this->oTemplate->replaceIdentifier('domain_name', LinkUtil::getHostName());
     if ($this->sAction === 'login') {
         $this->renderLogin();
     }
     $this->oTemplate->render();
 }
 /**
  * sendMail()
  */
 private function sendMail($oEmailTemplate, $bSendHtml = false)
 {
     $oEmailTemplate->replaceIdentifier('name', $this->oSubscriber->getName());
     $sSenderName = Settings::getSetting('newsletter', 'sender_name', 'Rapila Newsletter Plugin');
     $sSenderEmail = Settings::getSetting('newsletter', 'sender_email', LinkUtil::getDomainHolderEmail('no-reply'));
     $oEmailTemplate->replaceIdentifier('signature', $sSenderName);
     $oEmailTemplate->replaceIdentifier('weblink', LinkUtil::getHostName());
     $oEmail = new EMail(TranslationPeer::getString('wns.subscriber_email.subject'), $oEmailTemplate, $bSendHtml);
     $oEmail->setSender($sSenderName, $sSenderEmail);
     $oEmail->addRecipient($this->oSubscriber->getEmail());
     $oEmail->send();
 }