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


PHP CCrmFieldMulti::GetTemplateByComplex方法代码示例

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


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

示例1: __IncludeLang

if ($iDealId > 0) {
    __IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
    $arParams['PATH_TO_DEAL_SHOW'] = CrmCheckPath('PATH_TO_DEAL_SHOW', $arParams['PATH_TO_DEAL_SHOW'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&show');
    $arParams['PATH_TO_DEAL_EDIT'] = CrmCheckPath('PATH_TO_DEAL_EDIT', $arParams['PATH_TO_DEAL_EDIT'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&edit');
    $arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
    $arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
    $arResult['STAGE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_STAGE');
    $obRes = CCrmDeal::GetList(array(), array('ID' => $iDealId));
    $arDeal = $obRes->Fetch();
    if ($arDeal == false) {
        return;
    }
    $res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'DEAL', 'ELEMENT_ID' => $iDealId));
    while ($ar = $res->Fetch()) {
        if (empty($arDeal[$ar['COMPLEX_ID']])) {
            $arDeal[$ar['COMPLEX_ID']] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
        }
    }
    $arDeal['PATH_TO_DEAL_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_SHOW'], array('deal_id' => $iDealId));
    $arDeal['PATH_TO_DEAL_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_EDIT'], array('deal_id' => $iDealId));
    $arDeal['PATH_TO_CONTACT_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_SHOW'], array('contact_id' => $arDeal['CONTACT_ID']));
    $arDeal['PATH_TO_COMPANY_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_SHOW'], array('company_id' => $arDeal['COMPANY_ID']));
    $arDeal['CONTACT_NAME'] = CUser::FormatName(\Bitrix\Crm\Format\PersonNameFormatter::getFormat(), array('NAME' => $arDeal['NAME'], 'LAST_NAME' => $arDeal['LAST_NAME'], 'SECOND_NAME' => $arDeal['SECOND_NAME']), true, false);
    $strCard = '
<div class="bx-user-info-data-cont-video bx-user-info-fields" id="bx_user_info_data_cont_1">
	<div class="bx-user-info-data-name">
		<a href="' . $arDeal['PATH_TO_DEAL_SHOW'] . '">' . htmlspecialcharsbx($arDeal['TITLE']) . '</a>
	</div>
	<div class="bx-user-info-data-info">';
    if (!empty($arDeal['STAGE_ID'])) {
        $strCard .= '<span class="field-name">' . GetMessage('CRM_COLUMN_STAGE_ID') . '</span>:
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:card.ajax.php

示例2: array

        $internalContext = $arParams['INTERNAL_CONTEXT'];
        if (isset($internalContext['COMPANY_ID'])) {
            $addParams['company_id'] = $internalContext['COMPANY_ID'];
        }
    }
    if (!empty($addParams)) {
        $arResult['PATH_TO_CONTACT_ADD'] = CHTTP::urlAddParams($arResult['PATH_TO_CONTACT_ADD'], $addParams);
    }
}
// adding crm multi field to result array
if (isset($arResult['CONTACT_ID']) && !empty($arResult['CONTACT_ID'])) {
    $arFmList = array();
    $res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'CONTACT', 'ELEMENT_ID' => $arResult['CONTACT_ID']));
    while ($ar = $res->Fetch()) {
        if (!$isInExportMode) {
            $arFmList[$ar['ELEMENT_ID']][$ar['COMPLEX_ID']][] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
        } else {
            $arFmList[$ar['ELEMENT_ID']][$ar['COMPLEX_ID']][] = $ar['VALUE'];
        }
        $arResult['CONTACT'][$ar['ELEMENT_ID']]['~' . $ar['COMPLEX_ID']][] = $ar['VALUE'];
    }
    foreach ($arFmList as $elementId => $arFM) {
        foreach ($arFM as $complexId => $arComplexName) {
            $arResult['CONTACT'][$elementId][$complexId] = implode(', ', $arComplexName);
        }
    }
    // checkig access for operation
    $arContactAttr = CCrmPerms::GetEntityAttr('CONTACT', $arResult['CONTACT_ID']);
    foreach ($arResult['CONTACT_ID'] as $iContactId) {
        $arResult['CONTACT'][$iContactId]['EDIT'] = $CCrmPerms->CheckEnityAccess('CONTACT', 'WRITE', $arContactAttr[$iContactId]);
        $arResult['CONTACT'][$iContactId]['DELETE'] = $CCrmPerms->CheckEnityAccess('CONTACT', 'DELETE', $arContactAttr[$iContactId]);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例3: IntVal

    die;
}
$arResult['ENTITY_ID'] = $arParams['ENTITY_ID'];
$arResult['ELEMENT_ID'] = IntVal($arParams['ELEMENT_ID']);
$arResult['TYPE_ID'] = $arParams['TYPE_ID'];
$arResult['READ_ONLY'] = isset($arParams['READ_ONLY']) ? $arParams['READ_ONLY'] : false;
$arResult['VALUES'] = array();
if (isset($arParams['VALUES'][$arParams['TYPE_ID']]) && !empty($arParams['VALUES'][$arParams['TYPE_ID']])) {
    foreach ($arParams['VALUES'][$arParams['TYPE_ID']] as $ID => $arValue) {
        if (substr($ID, 0, 1) == 'n' && $arValue['VALUE'] == '') {
            continue;
        }
        $arResult['VALUES'][$ID]['ID'] = $ID;
        $arResult['VALUES'][$ID]['VALUE'] = $arValue['VALUE'];
        $arResult['VALUES'][$ID]['VALUE_TYPE'] = $arValue['VALUE_TYPE'];
        $arResult['VALUES'][$ID]['COMPLEX_ID'] = $arParams['TYPE_ID'] . '_' . $arValue['VALUE_TYPE'];
        $arResult['VALUES'][$ID]['COMPLEX_NAME'] = CCrmFieldMulti::GetEntityNameByComplex($arParams['TYPE_ID'] . '_' . $arValue['VALUE_TYPE']);
        $arResult['VALUES'][$ID]['TEMPLATE'] = CCrmFieldMulti::GetTemplateByComplex($arParams['TYPE_ID'] . '_' . $arValue['VALUE_TYPE'], $arValue['VALUE']);
    }
} elseif ($arResult['ELEMENT_ID'] > 0) {
    $res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => $arResult['ENTITY_ID'], 'ELEMENT_ID' => $arResult['ELEMENT_ID'], 'TYPE_ID' => $arResult['TYPE_ID']));
    while ($ar = $res->Fetch()) {
        $arResult['VALUES'][$ar['ID']]['ID'] = $ar['ID'];
        $arResult['VALUES'][$ar['ID']]['VALUE'] = $ar['VALUE'];
        $arResult['VALUES'][$ar['ID']]['VALUE_TYPE'] = $ar['VALUE_TYPE'];
        $arResult['VALUES'][$ar['ID']]['COMPLEX_ID'] = $ar['COMPLEX_ID'];
        $arResult['VALUES'][$ar['ID']]['COMPLEX_NAME'] = CCrmFieldMulti::GetEntityNameByComplex($ar['COMPLEX_ID']);
        $arResult['VALUES'][$ar['ID']]['TEMPLATE'] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
    }
}
$this->IncludeComponentTemplate();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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