本文整理汇总了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;
}