当前位置: 首页>>代码示例>>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;未经允许,请勿转载。