當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCrmOwnerType::ResolveIDByUFEntityID方法代碼示例

本文整理匯總了PHP中CCrmOwnerType::ResolveIDByUFEntityID方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCrmOwnerType::ResolveIDByUFEntityID方法的具體用法?PHP CCrmOwnerType::ResolveIDByUFEntityID怎麽用?PHP CCrmOwnerType::ResolveIDByUFEntityID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCrmOwnerType的用法示例。


在下文中一共展示了CCrmOwnerType::ResolveIDByUFEntityID方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

                $fields['SETTINGS']['DEFAULT_VALUE']['VALUE'] = $data['DT_DEFAULT_VALUE'];
            }
            if (isset($data['DT_TYPE']) && $data['DT_TYPE'] !== '') {
                $fields['SETTINGS']['DEFAULT_VALUE']['TYPE'] = $data['DT_TYPE'];
            }
            break;
    }
    $fields['EDIT_FORM_LABEL'] = array();
    $fields['LIST_COLUMN_LABEL'] = array();
    $fields['LIST_FILTER_LABEL'] = array();
    $langDbResult = CLanguage::GetList($by = '', $order = '');
    while ($lang = $langDbResult->Fetch()) {
        $lid = $lang['LID'];
        $fields['EDIT_FORM_LABEL'][$lid] = $fields['LIST_COLUMN_LABEL'][$lid] = $fields['LIST_FILTER_LABEL'][$lid] = $formLabel;
    }
    global $USER_FIELD_MANAGER;
    $crmFields = new CCrmFields($USER_FIELD_MANAGER, $entityID);
    $fieldName = $fields['FIELD_NAME'] = $crmFields->GetNextFieldId();
    $userField = new CUserTypeEntity();
    $fieldID = $userField->Add($fields);
    if ($fieldID > 0) {
        CCrmGridOptions::AddVisibleColumn(CCrmGridOptions::GetDefaultGrigID(CCrmOwnerType::ResolveIDByUFEntityID($entityID)), $fieldName);
        //Clear components cache
        $GLOBALS['CACHE_MANAGER']->ClearByTag("crm_fields_list_{$entityID}");
        __CrmConfigFieldEditEndResonse(array('RESULT' => array('ID' => $fieldID, 'FIELD_NAME' => $fieldName)));
    } else {
        __CrmConfigFieldEditEndResonse(array('ERROR' => "Could not create user feld."));
    }
} else {
    __CrmConfigFieldEditEndResonse(array('ERROR' => "Action '{$action}' is not supported in current context."));
}
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:ajax.php

示例2: UpdateField

 public function UpdateField($ID, $arField)
 {
     $obUserField = new CUserTypeEntity();
     $res = $obUserField->Update($ID, $arField);
     if ($res) {
         UserFieldHistory::processModification(CCrmOwnerType::ResolveIDByUFEntityID($this->sUFEntityID), $ID);
     }
     if ($res && $arField['USER_TYPE_ID'] == 'enumeration' && is_array($arField['LIST'])) {
         $obEnum = new CUserFieldEnum();
         $res = $obEnum->SetEnumValues($ID, $arField['LIST']);
     }
     $this->arUFList = $this->GetUserFields($this->sUFEntityID, 0, LANGUAGE_ID);
     return $res;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:14,代碼來源:crm_fields.php

示例3: elseif

     $res = $CCrmFields->AddField($arField);
 } else {
     $res = $CCrmFields->UpdateField($arResult['FIELD']['ID'], $arField);
 }
 if ($res) {
     //Save default value for 'SHOW_IN_LIST'
     if ($arResult['NEW_FIELD']) {
         $defaultShowInList = CUserOptions::GetOption('crm', 'uf_show_in_list', 'N');
         if ($arField['SHOW_IN_LIST'] === 'N' && $defaultShowInList !== 'N') {
             CUserOptions::DeleteOption('crm', 'uf_show_in_list');
         } elseif ($arField['SHOW_IN_LIST'] === 'Y' && $defaultShowInList !== 'Y') {
             CUserOptions::SetOption('crm', 'uf_show_in_list', 'Y');
         }
     }
     //Register/Unregister fild in entity list -->
     $gridID = CCrmGridOptions::GetDefaultGrigID(CCrmOwnerType::ResolveIDByUFEntityID($arResult['ENTITY_ID']));
     if ($arField['SHOW_IN_LIST'] === 'Y') {
         CCrmGridOptions::AddVisibleColumn($gridID, $arResult['FIELD_ID']);
     } else {
         CCrmGridOptions::RemoveVisibleColumn($gridID, $arResult['FIELD_ID']);
     }
     //<-- Register/Unregister fild in entity list
     //Clear components cache
     $GLOBALS['CACHE_MANAGER']->ClearByTag('crm_fields_list_' . $arResult['ENTITY_ID']);
     //And go to proper page
     if (isset($_POST['save'])) {
         LocalRedirect($arResult['~FIELDS_LIST_URL']);
     } elseif (isset($_POST['apply'])) {
         LocalRedirect(str_replace(array('#entity_id#', '#field_id#'), array($arResult['ENTITY_ID'], $arResult['FIELD_ID']), $arParams['~FIELD_EDIT_URL']));
     } else {
         LocalRedirect($arResult['~FIELDS_LIST_URL']);
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:component.php


注:本文中的CCrmOwnerType::ResolveIDByUFEntityID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。