本文整理汇总了PHP中Notifications::getTables方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifications::getTables方法的具体用法?PHP Notifications::getTables怎么用?PHP Notifications::getTables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifications
的用法示例。
在下文中一共展示了Notifications::getTables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
/**
* Installs the specified module in the system.
*
* The uninstall() method is called statically.
* To call other methods of this class from this method,
* the static call is used, for example,
* Configuration::getTables() instead of $this->getTables().
*/
function uninstall()
{
$query = new DB_Table_Delete(Notifications::getTables());
}
示例2: getMLSendTo
/**
* Gets a list of receiver addesses together with their languages.
*
*/
function getMLSendTo()
{
global $application;
$tables = Notifications::getTables();
$nst = $tables['notification_send_to']['columns'];
$query = new DB_Select();
$query->addSelectField($nst['email'], 'Email');
$query->addSelectField($nst['code'], 'Email_Code');
$query->WhereValue($nst['n_id'], DB_EQ, $this->notificationId);
$result = $application->db->getDB_Result($query);
$to = array();
foreach ($result as $ToEmail) {
if ($ToEmail['Email_Code'] == 'EMAIL_CUSTOMER') {
$customerEmail = null;
switch ($this->actionId) {
case '1':
case '2':
case '3':
case '4':
case '5':
$pushedCurrency = true;
$currencyId = modApiFunc('Localization', 'whichCurrencyToDisplayOrderIn', $this->orderId);
$orderInfo = modApiFunc('Checkout', 'getOrderInfo', $this->orderId, $currencyId);
modApiFunc('Localization', 'pushDisplayCurrency', $currencyId, $currencyId);
$customer_id = $orderInfo['PersonId'];
$account_name = modApiFunc('Customer_Account', 'getCustomerAccountNameByCustomerID', $customer_id);
$customer_obj =& $application->getInstance('CCustomerInfo', $account_name);
/* download links should be sent to shipping email, other info to main email */
$destination = $this->actionId == 5 ? 'Shipping' : 'Customer';
$customerEmail = $customer_obj->getPersonInfo('Email', $destination);
if (!$customerEmail) {
$customerEmail = $customer_obj->getPersonInfo('Email', 'Customer');
}
$customerLng = $customer_obj->getPersonInfo('Notification_Lng');
break;
case '6':
if (array_key_exists('Email', $this->customerRegData['info'])) {
$customerEmail = $this->customerRegData['info']['Email'];
$customerLng = modApiFunc('MultiLang', 'getLanguage');
}
break;
case '7':
case '8':
case '9':
case '10':
case '11':
case '12':
case '13':
case '15':
$customer_obj =& $application->getInstance('CCustomerInfo', $this->customerAccount);
$customerEmail = $customer_obj->getPersonInfo('Email', 'Customer');
$customerLng = $customer_obj->getPersonInfo('Notification_Lng');
break;
}
if ($customerEmail) {
if (!modApiFunc('MultiLang', 'checkLanguage', $customerLng)) {
$customerLng = modApiFunc('MultiLang', 'getDefaultLanguage');
}
if (!modApiFunc('MultiLang', 'checkLanguage', $customerLng)) {
$customerLng = modApiFunc('MultiLang', '_getAnyLanguage');
}
$to[] = array($customerEmail, $customerLng);
}
} else {
$email = modApiFunc("Notifications", "getExtendedEmail", $ToEmail['Email'], $ToEmail['Email_Code'], true, NULL, true);
if ($email[0]) {
$to[] = $email;
}
}
}
return $to;
}