本文整理匯總了PHP中ca_users::getAppConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_users::getAppConfig方法的具體用法?PHP ca_users::getAppConfig怎麽用?PHP ca_users::getAppConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ca_users
的用法示例。
在下文中一共展示了ca_users::getAppConfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sendMessage
/**
* @param int $pn_transaction_id,
* @param string $ps_type = "O" for sales order, "L" for library loans
* @param int $pn_source
* @param string $ps_subject
* @param string $ps_message
* @param array $pa_options
*/
public static function sendMessage($pn_transaction_id, $ps_type, $pn_source, $pn_user_id, $ps_subject, $ps_message, $pa_options = null)
{
global $g_request;
$t_comm = new ca_commerce_communications();
$t_comm->setMode(ACCESS_WRITE);
$t_comm->set('transaction_id', $pn_transaction_id);
$t_comm->set('communications_type', $ps_type);
$t_comm->set('source', $pn_source);
$t_comm->set('subject', $ps_subject);
$t_comm->set('message', $ps_message);
$t_comm->set('from_user_id', $pn_user_id);
$t_comm->insert();
if ($pn_source == __CA_COMMERCE_COMMUNICATION_SOURCE_INSTITUTION__ && $g_request) {
$t_trans = new ca_commerce_transactions($pn_transaction_id);
$t_from_user = new ca_users($pn_user_id);
$t_to_user = new ca_users($t_trans->get('user_id'));
$vs_sender_email = $t_from_user->get('email');
$vs_to_email = $t_to_user->get('email');
caSendMessageUsingView($g_request, $vs_to_email, $vs_sender_email, "[" . $t_from_user->getAppConfig()->get('app_display_name') . "] {$ps_subject}", "commerce_communication.tpl", array('subject' => $ps_subject, 'message' => $ps_message, 'from_user_id' => $pn_user_id, 'sender_name' => $t_from_user->get('fname') . ' ' . $t_from_user->get('lname'), 'sender_email' => $t_from_user->get('email'), 'sent_on' => time(), 'login_url' => $t_from_user->getAppConfig()->get('site_host') . '/' . $t_from_user->getAppConfig()->get('ca_url_root')));
}
return $t_comm;
}