本文整理匯總了PHP中CCrmPerms::GetPermType方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCrmPerms::GetPermType方法的具體用法?PHP CCrmPerms::GetPermType怎麽用?PHP CCrmPerms::GetPermType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CCrmPerms
的用法示例。
在下文中一共展示了CCrmPerms::GetPermType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
case 'LEAD':
$dbRes = CCrmLead::GetList(array('TITLE' => 'ASC', 'LAST_NAME' => 'ASC', 'NAME' => 'ASC'), array('ID' => $arResult['ENTITY_ID']));
if ($arRes = $dbRes->Fetch()) {
$arResult['ENTITY_TITLE'] = $arRes['TITLE'];
$arResult['STATUS_ID'] = $arRes['STATUS_ID'];
$arResult['ENTITY_CONVERTED'] = $arRes['STATUS_ID'] == 'CONVERTED' ? 'Y' : 'N';
}
$arEntityAttr = $CCrmPerms->GetEntityAttr('LEAD', $arResult['ENTITY_ID']);
if ($CCrmPerms->CheckEnityAccess('LEAD', 'WRITE', $arEntityAttr[$arResult['ENTITY_ID']])) {
$arResult['STATUS_LIST'] = array();
$arResult['STATUS_LIST_EX'] = CCrmStatus::GetStatusList('STATUS');
foreach ($arResult['STATUS_LIST_EX'] as $key => $value) {
if ($key == 'CONVERTED') {
continue;
}
if ($CCrmPerms->GetPermType('LEAD', 'WRITE', array('STATUS_ID' . $key)) > BX_CRM_PERM_NONE) {
$arResult['STATUS_LIST']['REFERENCE'][] = $value;
$arResult['STATUS_LIST']['REFERENCE_ID'][] = $key;
}
}
$arResult['PHONE_GROUPS'][] = array('PHONES' => __CrmEventGetPhones('LEAD', $arResult['ENTITY_ID']));
}
break;
case 'CONTACT':
$dbRes = CCrmContact::GetList(array('LAST_NAME' => 'ASC', 'NAME' => 'ASC'), array('ID' => $arResult['ENTITY_ID']));
if ($arRes = $dbRes->Fetch()) {
$arResult['ENTITY_TITLE'] = $arRes['LAST_NAME'] . ' ' . $arRes['NAME'];
}
break;
case 'COMPANY':
$dbRes = CCrmCompany::GetList(array('TITLE' => 'ASC'), array('ID' => $arResult['ENTITY_ID']));