本文整理汇总了PHP中Cx\Core\Core\Controller\Cx::getBackendFolderName方法的典型用法代码示例。如果您正苦于以下问题:PHP Cx::getBackendFolderName方法的具体用法?PHP Cx::getBackendFolderName怎么用?PHP Cx::getBackendFolderName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cx\Core\Core\Controller\Cx
的用法示例。
在下文中一共展示了Cx::getBackendFolderName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendUserAccountInvitationMail
/**
* Send a invitation mail to the created user.
* It used the old mail function
*
* @param string $generatedPassword
*/
protected function sendUserAccountInvitationMail($generatedPassword)
{
$objUserMail = \FWUser::getFWUserObject()->getMail();
if (($objUserMail->load('user_account_invitation', $_LANGID) || $objUserMail->load('user_account_invitation')) && \Env::get('ClassLoader')->loadFile(ASCMS_LIBRARY_PATH . '/phpmailer/class.phpmailer.php') && ($objMail = new \PHPMailer()) !== false) {
if ($_CONFIG['coreSmtpServer'] > 0 && \Env::get('ClassLoader')->loadFile(ASCMS_CORE_PATH . '/SmtpSettings.class.php')) {
if (($arrSmtp = \SmtpSettings::getSmtpAccount($_CONFIG['coreSmtpServer'])) !== false) {
$objMail->IsSMTP();
$objMail->Host = $arrSmtp['hostname'];
$objMail->Port = $arrSmtp['port'];
$objMail->SMTPAuth = true;
$objMail->Username = $arrSmtp['username'];
$objMail->Password = $arrSmtp['password'];
}
}
$objMail->CharSet = CONTREXX_CHARSET;
$objMail->From = $objUserMail->getSenderMail();
$objMail->FromName = $objUserMail->getSenderName();
$objMail->AddReplyTo($objUserMail->getSenderMail());
$objMail->Subject = $objUserMail->getSubject();
$placeholders = array('[[WEBSITE]]', '[[FIRSTNAME]]', '[[LASTNAME]]', '[[EMAIL]]', '[[PASSWORD]]', '[[LINK]]', '[[SENDER]]');
$domainRepository = new \Cx\Core\Net\Model\Repository\DomainRepository();
$mainDomain = $domainRepository->getMainDomain()->getName();
$placeholdersVal = array($mainDomain, contrexx_raw2xhtml($this->getProfileAttribute('firstname')), contrexx_raw2xhtml($this->getProfileAttribute('lastname')), $this->getEmail(), $generatedPassword, ASCMS_PROTOCOL . '://' . $mainDomain . \Cx\Core\Core\Controller\Cx::getBackendFolderName(), contrexx_raw2xhtml($objUserMail->getSenderName()));
if (in_array($objUserMail->getFormat(), array('multipart', 'text'))) {
$objUserMail->getFormat() == 'text' ? $objMail->IsHTML(false) : false;
$objMail->{($objUserMail->getFormat() == 'text' ? '' : 'Alt') . 'Body'} = str_replace($placeholders, $placeholdersVal, $objUserMail->getBodyText());
}
if (in_array($objUserMail->getFormat(), array('multipart', 'html'))) {
$objUserMail->getFormat() == 'html' ? $objMail->IsHTML(true) : false;
$objMail->Body = str_replace($placeholders, $placeholdersVal, $objUserMail->getBodyHtml());
}
$objMail->AddAddress($this->getEmail());
$objMail->Send();
}
}