本文整理汇总了PHP中CCrmFieldMulti::PrepareListHeaders方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmFieldMulti::PrepareListHeaders方法的具体用法?PHP CCrmFieldMulti::PrepareListHeaders怎么用?PHP CCrmFieldMulti::PrepareListHeaders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrmFieldMulti
的用法示例。
在下文中一共展示了CCrmFieldMulti::PrepareListHeaders方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$sValOriginator = ob_get_contents();
ob_end_clean();
$arResult['FILTER'] = array(array('id' => 'FIND', 'name' => GetMessage('CRM_COLUMN_FIND'), 'default' => 'Y', 'type' => 'quick', 'items' => array('full_name' => GetMessage('CRM_COLUMN_TITLE_NAME_LAST_NAME'), 'email' => GetMessage('CRM_COLUMN_EMAIL'), 'phone' => GetMessage('CRM_COLUMN_PHONE'))), array('id' => 'ID', 'name' => GetMessage('CRM_COLUMN_ID')), array('id' => 'NAME', 'name' => GetMessage('CRM_COLUMN_NAME')), array('id' => 'LAST_NAME', 'name' => GetMessage('CRM_COLUMN_LAST_NAME')), array('id' => 'SECOND_NAME', 'name' => GetMessage('CRM_COLUMN_SECOND_NAME')), array('id' => 'BIRTHDATE', 'name' => GetMessage('CRM_COLUMN_BIRTHDATE'), 'type' => 'date'), array('id' => 'COMPANY_ID', 'default' => 'Y', 'name' => GetMessage('CRM_COLUMN_COMPANY_LIST'), 'type' => 'custom', 'value' => $sValCompany), array('id' => 'COMPANY_TITLE', 'default' => false, 'name' => GetMessage('CRM_COLUMN_COMPANY_TITLE')), array('id' => 'PHONE', 'name' => GetMessage('CRM_COLUMN_PHONE')), array('id' => 'EMAIL', 'name' => GetMessage('CRM_COLUMN_EMAIL')), array('id' => 'WEB', 'name' => GetMessage('CRM_COLUMN_WEB')), array('id' => 'IM', 'name' => GetMessage('CRM_COLUMN_MESSENGER')), array('id' => 'POST', 'name' => GetMessage('CRM_COLUMN_POST')), array('id' => 'ADDRESS', 'name' => $addressLabels['ADDRESS']), array('id' => 'ADDRESS_2', 'name' => $addressLabels['ADDRESS_2']), array('id' => 'ADDRESS_CITY', 'name' => $addressLabels['CITY']), array('id' => 'ADDRESS_REGION', 'name' => $addressLabels['REGION']), array('id' => 'ADDRESS_PROVINCE', 'name' => $addressLabels['PROVINCE']), array('id' => 'ADDRESS_POSTAL_CODE', 'name' => $addressLabels['POSTAL_CODE']), array('id' => 'ADDRESS_COUNTRY', 'name' => $addressLabels['COUNTRY']), array('id' => 'COMMENTS', 'name' => GetMessage('CRM_COLUMN_COMMENTS')), array('id' => 'TYPE_ID', 'params' => array('multiple' => 'Y'), 'name' => GetMessage('CRM_COLUMN_TYPE'), 'default' => 'Y', 'type' => 'list', 'items' => CCrmStatus::GetStatusList('CONTACT_TYPE')), array('id' => 'SOURCE_ID', 'params' => array('multiple' => 'Y'), 'name' => GetMessage('CRM_COLUMN_SOURCE'), 'type' => 'list', 'items' => CCrmStatus::GetStatusList('SOURCE')), array('id' => 'EXPORT', 'name' => GetMessage('CRM_COLUMN_EXPORT'), 'type' => 'list', 'items' => array('' => '', 'Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'))), array('id' => 'DATE_CREATE', 'name' => GetMessage('CRM_COLUMN_DATE_CREATE'), 'type' => 'date'), array('id' => 'CREATED_BY_ID', 'name' => GetMessage('CRM_COLUMN_CREATED_BY'), 'default' => false, 'enable_settings' => false, 'type' => 'user'), array('id' => 'DATE_MODIFY', 'name' => GetMessage('CRM_COLUMN_DATE_MODIFY'), 'default' => 'Y', 'type' => 'date'), array('id' => 'MODIFY_BY_ID', 'name' => GetMessage('CRM_COLUMN_MODIFY_BY'), 'default' => false, 'enable_settings' => true, 'type' => 'user'), array('id' => 'ASSIGNED_BY_ID', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY'), 'default' => false, 'enable_settings' => true, 'type' => 'user'), array('id' => 'ORIGINATOR_ID', 'name' => GetMessage('CRM_COLUMN_BINDING'), 'type' => 'custom', 'value' => $sValOriginator));
$CCrmUserType->ListAddFilterFields($arResult['FILTER'], $arResult['FILTER2LOGIC'], $arResult['GRID_ID']);
$currentUserID = $arResult['CURRENT_USER_ID'];
$currentUserName = CCrmViewHelper::GetFormattedUserName($currentUserID, $arParams['NAME_TEMPLATE']);
$arResult['FILTER_PRESETS'] = array('filter_my' => array('name' => GetMessage('CRM_PRESET_MY'), 'fields' => array('ASSIGNED_BY_ID_name' => $currentUserName, 'ASSIGNED_BY_ID' => $currentUserID)), 'filter_change_my' => array('name' => GetMessage('CRM_PRESET_CHANGE_MY'), 'fields' => array('MODIFY_BY_ID_name' => $currentUserName, 'MODIFY_BY_ID' => $currentUserID)));
}
// Headers initialization -->
$arResult['HEADERS'] = array(array('id' => 'ID', 'name' => GetMessage('CRM_COLUMN_ID'), 'sort' => 'id', 'default' => false, 'editable' => false, 'type' => 'int', 'class' => 'minimal'), array('id' => 'CONTACT_SUMMARY', 'name' => GetMessage('CRM_COLUMN_CONTACT'), 'sort' => 'full_name', 'default' => true, 'editable' => false));
// Dont display activities in INTERNAL mode.
if (!$bInternal) {
$arResult['HEADERS'][] = array('id' => 'ACTIVITY_ID', 'name' => GetMessage('CRM_COLUMN_ACTIVITY'), 'sort' => 'nearest_activity', 'default' => true);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'CONTACT_COMPANY', 'name' => GetMessage('CRM_COLUMN_CONTACT_COMPANY_INFO'), 'sort' => 'company_title', 'default' => true, 'editable' => false), array('id' => 'PHOTO', 'name' => GetMessage('CRM_COLUMN_PHOTO'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'NAME', 'name' => GetMessage('CRM_COLUMN_NAME'), 'sort' => 'name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'LAST_NAME', 'name' => GetMessage('CRM_COLUMN_LAST_NAME'), 'sort' => 'last_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'SECOND_NAME', 'name' => GetMessage('CRM_COLUMN_SECOND_NAME'), 'sort' => 'second_name', 'default' => false, 'editable' => true, 'class' => 'username'), array('id' => 'BIRTHDATE', 'name' => GetMessage('CRM_COLUMN_BIRTHDATE'), 'sort' => 'BIRTHDATE', 'default' => false, 'editable' => true, 'type' => 'date'), array('id' => 'POST', 'name' => GetMessage('CRM_COLUMN_POST'), 'sort' => 'post', 'default' => false, 'editable' => true), array('id' => 'COMPANY_ID', 'name' => GetMessage('CRM_COLUMN_COMPANY_ID'), 'sort' => 'company_title', 'default' => false, 'editable' => false), array('id' => 'TYPE_ID', 'name' => GetMessage('CRM_COLUMN_TYPE'), 'sort' => 'type_id', 'default' => false, 'editable' => array('items' => CCrmStatus::GetStatusList('CONTACT_TYPE')), 'type' => 'list')));
$CCrmFieldMulti->PrepareListHeaders($arResult['HEADERS']);
if ($isInExportMode) {
$CCrmFieldMulti->ListAddHeaders($arResult['HEADERS']);
}
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'ASSIGNED_BY', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY'), 'sort' => 'assigned_by', 'default' => true, 'editable' => false, 'class' => 'username'), array('id' => 'FULL_ADDRESS', 'name' => EntityAddress::getFullAddressLabel(), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'ADDRESS', 'name' => $addressLabels['ADDRESS'], 'sort' => 'address', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_2', 'name' => $addressLabels['ADDRESS_2'], 'sort' => 'address_2', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_CITY', 'name' => $addressLabels['CITY'], 'sort' => 'address_city', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_REGION', 'name' => $addressLabels['REGION'], 'sort' => 'address_region', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_PROVINCE', 'name' => $addressLabels['PROVINCE'], 'sort' => 'address_province', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_POSTAL_CODE', 'name' => $addressLabels['POSTAL_CODE'], 'sort' => 'address_postal_code', 'default' => false, 'editable' => false), array('id' => 'ADDRESS_COUNTRY', 'name' => $addressLabels['COUNTRY'], 'sort' => 'address_country', 'default' => false, 'editable' => false), array('id' => 'COMMENTS', 'name' => GetMessage('CRM_COLUMN_COMMENTS'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'SOURCE_ID', 'name' => GetMessage('CRM_COLUMN_SOURCE'), 'sort' => 'source_id', 'default' => false, 'editable' => array('items' => CCrmStatus::GetStatusList('SOURCE')), 'type' => 'list'), array('id' => 'SOURCE_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_SOURCE_DESCRIPTION'), 'sort' => false, 'default' => false, 'editable' => false), array('id' => 'EXPORT', 'name' => GetMessage('CRM_COLUMN_EXPORT'), 'type' => 'checkbox', 'default' => false, 'editable' => true), array('id' => 'CREATED_BY', 'name' => GetMessage('CRM_COLUMN_CREATED_BY'), 'sort' => 'created_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'DATE_CREATE', 'name' => GetMessage('CRM_COLUMN_DATE_CREATE'), 'sort' => 'date_create', 'default' => false, 'class' => 'date'), array('id' => 'MODIFY_BY', 'name' => GetMessage('CRM_COLUMN_MODIFY_BY'), 'sort' => 'modify_by', 'default' => false, 'editable' => false, 'class' => 'username'), array('id' => 'DATE_MODIFY', 'name' => GetMessage('CRM_COLUMN_DATE_MODIFY'), 'sort' => 'date_modify', 'default' => false, 'class' => 'date')));
$CCrmUserType->ListAddHeaders($arResult['HEADERS']);
if (IsModuleInstalled('bizproc')) {
$arBPData = CBPDocument::GetWorkflowTemplatesForDocumentType(array('crm', 'CCrmDocumentContact', 'CONTACT'));
$arDocumentStates = CBPDocument::GetDocumentStates(array('crm', 'CCrmDocumentContact', 'CONTACT'), null);
foreach ($arBPData as $arBP) {
if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::StartWorkflow, $userID, array('crm', 'CCrmDocumentContact', 'CONTACT'), array('UserGroups' => $CCrmBizProc->arCurrentUserGroups, 'DocumentStates' => $arDocumentStates, 'WorkflowTemplateId' => $arBP['ID'], 'UserIsAdmin' => $isAdmin, 'CRMPermission' => $arResult['PERMS']['READ']))) {
continue;
}
$arResult['HEADERS'][] = array('id' => 'BIZPROC_' . $arBP['ID'], 'name' => $arBP['NAME'], 'sort' => false, 'default' => false, 'editable' => false);
}
}