当前位置: 首页>>代码示例>>PHP>>正文


PHP CCrmFieldMulti::GetEntityTypes方法代码示例

本文整理汇总了PHP中CCrmFieldMulti::GetEntityTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmFieldMulti::GetEntityTypes方法的具体用法?PHP CCrmFieldMulti::GetEntityTypes怎么用?PHP CCrmFieldMulti::GetEntityTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCrmFieldMulti的用法示例。


在下文中一共展示了CCrmFieldMulti::GetEntityTypes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: htmlspecialcharsbx

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
global $APPLICATION;
$APPLICATION->AddHeadString('<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . '/crm_mobile.js') . '"></script>', true, \Bitrix\Main\Page\AssetLocation::AFTER_JS_KERNEL);
$APPLICATION->SetPageProperty('BodyClass', 'crm-page');
$UID = $arResult['UID'];
$mode = $arResult['MODE'];
$prefix = htmlspecialcharsbx($UID);
$entityID = $arResult['ENTITY_ID'];
$entity = $arResult['ENTITY'];
$dataItem = CCrmMobileHelper::PrepareCompanyData($entity);
$multiFieldTypeInfos = CCrmFieldMulti::GetEntityTypes();
$multiFieldTypeSettings = array();
foreach ($multiFieldTypeInfos as $multiFieldTypeID => &$multiFieldTypeInfo) {
    $multiFieldTypeSettings[$multiFieldTypeID] = array();
    foreach ($multiFieldTypeInfo as $multiFieldValueTypeID => &$multiFieldValueTypeInfo) {
        $multiFieldTypeSettings[$multiFieldTypeID][$multiFieldValueTypeID] = isset($multiFieldValueTypeInfo['ABBR']) ? $multiFieldValueTypeInfo['ABBR'] : $multiFieldValueTypeID;
    }
    unset($multiFieldValueTypeInfo);
}
unset($multiFieldTypeInfo);
$formTitle = GetMessage("M_CRM_COMPANY_EDIT_{$mode}_TITLE");
if (!function_exists('__CrmMobileCompanyEditRenderMultiFields')) {
    function __CrmMobileCompanyEditRenderMultiFields($typeName, &$fields, &$typeInfos, $prefix = '')
    {
        $typeName = strtoupper($typeName);
        $data = isset($fields[$typeName]) ? $fields[$typeName] : array();
        if ($prefix !== '') {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例2: showField


//.........这里部分代码省略.........
                break;
            case "AVATAR_ID":
                if (intval($arField["VALUE"]) > 0) {
                    $arFileTmp = CFile::ResizeImageGet($arField["VALUE"], array('width' => $this->params["AVATAR_SIZE"], 'height' => $this->params["AVATAR_SIZE"]), BX_RESIZE_IMAGE_EXACT, false);
                    $strResult .= "#row_begin#";
                    $strResult .= "#cell_begin_left#";
                    $strResult .= $arField["TITLE"] . ":";
                    $strResult .= "#cell_end#";
                    $strResult .= "#cell_begin_right#";
                    $strResult .= '<span class="crm-feed-info-text-padding">';
                    $strResult .= '<img src="' . $arFileTmp["src"] . '" border="0" alt="' . $this->params["AVATAR_SIZE"] . '" width="" height="' . $this->params["AVATAR_SIZE"] . '">';
                    $strResult .= '</span>';
                    $strResult .= "#cell_end#";
                    $strResult .= "#row_end#";
                }
                break;
            case "SUM":
                if (intval($arField["VALUE"]["VALUE"]) > 0) {
                    $strResult .= "#row_begin#";
                    $strResult .= "#cell_begin_left#";
                    $strResult .= $arField["TITLE"] . ":";
                    $strResult .= "#cell_end#";
                    $strResult .= "#cell_begin_right#";
                    $strResult .= '<span class="crm-feed-info-text-padding">';
                    $strResult .= '<span class="crm-feed-info-sum">' . CCrmCurrency::MoneyToString($arField["VALUE"]["VALUE"], $arField["VALUE"]["CURRENCY"]) . '</span>';
                    $strResult .= '</span>';
                    $strResult .= "#cell_end#";
                    $strResult .= "#row_end#";
                }
                break;
            case "PHONE":
            case "EMAIL":
                if (!empty($arField["VALUE"])) {
                    $infos = CCrmFieldMulti::GetEntityTypes();
                    $strResult .= "#row_begin#";
                    $strResult .= "#cell_begin_left#";
                    $strResult .= $arField["TITLE"] . ":";
                    $strResult .= "#cell_end#";
                    $strResult .= "#cell_begin_right#";
                    $strResult .= '<span class="crm-feed-info-text-padding">';
                    $strResult .= CCrmViewHelper::PrepareFirstMultiFieldHtml($arField["FORMAT"], $arField["VALUE"], $infos[$arField["FORMAT"]]);
                    if (count($arField["VALUE"]) > 1 || !empty($arField["VALUE"]["WORK"]) && count($arField["VALUE"]["WORK"]) > 1 || !empty($arField["VALUE"]["MOBILE"]) && count($arField["VALUE"]["MOBILE"]) > 1 || !empty($arField["VALUE"]["FAX"]) && count($arField["VALUE"]["FAX"]) > 1 || !empty($arField["VALUE"]["PAGER"]) && count($arField["VALUE"]["PAGER"]) > 1 || !empty($arField["VALUE"]["OTHER"]) && count($arField["VALUE"]["OTHER"]) > 1) {
                        $anchorID = strtolower($arField["FORMAT"]);
                        $strResult .= '<span style="margin-left: 10px;" class="crm-item-tel-list" id="' . htmlspecialcharsbx($anchorID) . '"' . ' onclick="' . CCrmViewHelper::PrepareMultiFieldValuesPopup($anchorID, $anchorID, $arField["FORMAT"], $arField["VALUE"], $infos[$arField["FORMAT"]]) . '"></span>';
                    }
                    $strResult .= '</span>';
                    $strResult .= "#cell_end#";
                    $strResult .= "#row_end#";
                    if ($arField["FORMAT"] == "PHONE" && defined("BX_COMP_MANAGED_CACHE")) {
                        $GLOBALS["CACHE_MANAGER"]->RegisterTag("CRM_CALLTO_SETTINGS");
                    }
                }
                break;
            case "TEXT_FORMATTED":
            case "TEXT_FORMATTED_BOLD":
                if ($arField["VALUE"] != CCrmLiveFeed::UntitledMessageStub) {
                    $text_formatted = $this->ParseText(htmlspecialcharsback($arField["VALUE"]), $arUF, $arParams["PARAMS"]);
                    if (strlen($text_formatted) > 0) {
                        $strResult .= "#row_begin#";
                        $strResult .= "#cell_begin_colspan2#";
                        if ($arField["FORMAT"] == "TEXT_FORMATTED_BOLD") {
                            $strResult .= "<b>" . $text_formatted . "</b>";
                        } else {
                            $strResult .= $text_formatted;
                        }
                        $strResult .= "#cell_end#";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:67,代码来源:livefeed.php

示例3: PrepareExportFieldsList

 public static function PrepareExportFieldsList(&$arSelect, $arFieldMap, $processMultiFields = true)
 {
     if ($processMultiFields) {
         $arMultiFieldTypes = CCrmFieldMulti::GetEntityTypes();
         foreach ($arMultiFieldTypes as $typeID => &$arType) {
             if (isset($arFieldMap[$typeID])) {
                 continue;
             }
             $arFieldMap[$typeID] = array();
             $arValueTypes = array_keys($arType);
             foreach ($arValueTypes as $valueType) {
                 $arFieldMap[$typeID][] = "{$typeID}_{$valueType}";
             }
         }
         unset($arType);
     }
     foreach ($arFieldMap as $fieldID => &$arFieldReplace) {
         $offset = array_search($fieldID, $arSelect, true);
         if ($offset === false) {
             continue;
         }
         array_splice($arSelect, $offset, 1, array_diff($arFieldReplace, $arSelect));
     }
     unset($arFieldReplace);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:25,代码来源:crm_component_helper.php

示例4: __CrmQuickPanelViewPrepareMultiFields

 function __CrmQuickPanelViewPrepareMultiFields(array $multiFields, $entityTypeName, $entityID, $typeID)
 {
     if (empty($multiFields)) {
         return null;
     }
     $arEntityTypeInfos = CCrmFieldMulti::GetEntityTypeInfos();
     $arEntityTypes = CCrmFieldMulti::GetEntityTypes();
     $sipConfig = array('STUB' => GetMessage('CRM_ENTITY_QPV_MULTI_FIELD_NOT_ASSIGNED'), 'ENABLE_SIP' => true, 'SIP_PARAMS' => array('ENTITY_TYPE' => 'CRM_' . $entityTypeName, 'ENTITY_ID' => $entityID));
     $typeInfo = isset($arEntityTypeInfos[$typeID]) ? $arEntityTypeInfos[$typeID] : array();
     $result = array('type' => 'multiField', 'caption' => isset($typeInfo['NAME']) ? $typeInfo['NAME'] : $typeID, 'data' => array('type' => $typeID, 'items' => array()));
     foreach ($multiFields as $multiField) {
         $value = isset($multiField['VALUE']) ? $multiField['VALUE'] : '';
         $valueType = isset($multiField['VALUE_TYPE']) ? $multiField['VALUE_TYPE'] : '';
         $entityType = $arEntityTypes[$typeID];
         $valueTypeInfo = isset($entityType[$valueType]) ? $entityType[$valueType] : null;
         $params = array('VALUE' => $value, 'VALUE_TYPE_ID' => $valueType, 'VALUE_TYPE' => $valueTypeInfo);
         $result['data']['items'][] = CCrmViewHelper::PrepareMultiFieldValueItemData($typeID, $params, $sipConfig);
     }
     return $result;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:20,代码来源:component.php

示例5: PrepareMultiFieldValueItemData

 public static function PrepareMultiFieldValueItemData($typeName, $params, $arOptions = array())
 {
     $enableSip = is_array($arOptions) && isset($arOptions['ENABLE_SIP']) && (bool) $arOptions['ENABLE_SIP'];
     $sipParams = $enableSip && isset($arOptions['SIP_PARAMS']) ? $arOptions['SIP_PARAMS'] : null;
     $value = isset($params['VALUE']) ? $params['VALUE'] : '';
     $valueTypeID = isset($params['VALUE_TYPE_ID']) ? $params['VALUE_TYPE_ID'] : '';
     $valueType = isset($params['VALUE_TYPE']) ? $params['VALUE_TYPE'] : null;
     if (!$valueType && $valueTypeID !== '') {
         $arEntityTypes = CCrmFieldMulti::GetEntityTypes();
         $arValueTypes = isset($arEntityTypes[$typeName]) ? $arEntityTypes[$typeName] : array();
         $valueType = isset($arValueTypes[$valueTypeID]) ? $arValueTypes[$valueTypeID] : null;
     }
     $itemData = array('value' => self::PrepareMultiFieldHtml($typeName, $params, $arOptions), 'type' => htmlspecialcharsbx(is_array($valueType) && isset($valueType['SHORT']) ? strtolower($valueType['SHORT']) : ''));
     if ($typeName === 'PHONE' && $enableSip && $value !== '') {
         $itemData['sipCallHtml'] = self::PrepareSipCallHtml($value, $sipParams);
     }
     return $itemData;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:crm_view_helper.php


注:本文中的CCrmFieldMulti::GetEntityTypes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。