本文整理匯總了PHP中CRM_Utils_System::setUserContext方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Utils_System::setUserContext方法的具體用法?PHP CRM_Utils_System::setUserContext怎麽用?PHP CRM_Utils_System::setUserContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Utils_System
的用法示例。
在下文中一共展示了CRM_Utils_System::setUserContext方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: form
/**
* This function contains the default action
*
* @param $action
*
* @static
* @access public
*/
static function form($action, $contact_type, $contact_sub_type)
{
CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
$wrapper = new CRM_Utils_Wrapper();
$properties = CRM_Core_Component::contactSubTypeProperties($contact_sub_type, 'Edit');
if ($properties) {
$wrapper->run($properties['class'], ts('New %1', array(1 => $contact_sub_type)), $action, TRUE);
} else {
$wrapper->run('CRM_Contact_Form_Contact', ts('New Contact'), $action, TRUE);
}
}
示例2: form
/**
* This function contains the default action
*
* @param $action
*
* @static
* @access public
*/
function form($action)
{
CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
$wrapper =& new CRM_Utils_Wrapper();
$wrapper->run('CRM_Contact_Form_Edit', ts('Contact Page'), $action);
}