本文整理汇总了PHP中CCrmStatus类的典型用法代码示例。如果您正苦于以下问题:PHP CCrmStatus类的具体用法?PHP CCrmStatus怎么用?PHP CCrmStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CCrmStatus类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: GetPropertiesDialog
public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = '')
{
if (!CModule::IncludeModule('crm')) {
return false;
}
$runtime = CBPRuntime::GetRuntime();
$arMap = array('EventType' => 'event_type', 'EventText' => 'event_text');
if (!is_array($arWorkflowParameters)) {
$arWorkflowParameters = array();
}
if (!is_array($arWorkflowVariables)) {
$arWorkflowVariables = array();
}
if (!is_array($arCurrentValues)) {
$arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
if (is_array($arCurrentActivity['Properties'])) {
foreach ($arMap as $k => $v) {
if (array_key_exists($k, $arCurrentActivity['Properties'])) {
$arCurrentValues[$arMap[$k]] = $arCurrentActivity['Properties'][$k];
} else {
$arCurrentValues[$arMap[$k]] = '';
}
}
} else {
foreach ($arMap as $k => $v) {
$arCurrentValues[$arMap[$k]] = '';
}
}
}
return $runtime->ExecuteResourceFile(__FILE__, 'properties_dialog.php', array('arCurrentValues' => $arCurrentValues, 'arTypes' => CCrmStatus::GetStatusList('EVENT_TYPE'), 'formName' => $formName));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:crmeventaddactivity.php
示例2: GetStatusList
private static function GetStatusList($id)
{
if (!isset(self::$STATUSES[$id])) {
self::$STATUSES[$id] = CCrmStatus::GetStatus($id);
}
return self::$STATUSES[$id];
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:user_counter.php
示例3: PrepareDocument
public static function PrepareDocument(array &$arFields)
{
$stuses = CCrmStatus::GetStatusList('STATUS');
$statusID = isset($arFields['STATUS_ID']) ? $arFields['STATUS_ID'] : '';
$arFields['STATUS_ID_PRINTABLE'] = $statusID !== '' && isset($stuses[$statusID]) ? $stuses[$statusID] : '';
$arFields['FULL_ADDRESS'] = Bitrix\Crm\Format\LeadAddressFormatter::format($arFields, array('SEPARATOR' => Bitrix\Crm\Format\AddressSeparator::Comma));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:7,代码来源:crm_document_lead.php
示例4: installDefault
public static function installDefault()
{
$items = array();
$langIDs = self::getAllLangIDs();
foreach ($langIDs as $langID) {
IncludeModuleLangFile(__FILE__, $langID);
$s = trim(GetMessage('CRM_HONORIFIC_DEFAULT'));
if ($s === '' || $s === '-') {
//Skip stub
continue;
}
$slugs = explode('|', $s);
$slugCount = count($slugs);
for ($i = 0; $i < $slugCount; $i++) {
$ary = explode(';', $slugs[$i]);
$count = count($ary);
if ($count >= 2) {
$name = trim($ary[1]);
$statusID = trim($ary[0]);
} else {
$name = trim($ary[0]);
$statusID = '';
}
if ($statusID === '') {
$statusID = 'HNR_' . strtoupper($langID) . '_' . ($i + 1);
}
if ($name === '' || isset($items[$statusID])) {
continue;
}
$items[$statusID] = array('STATUS_ID' => $statusID, 'NAME' => $name, 'SORT' => ($i + 1) * 10, 'SYSTEM' => 'N');
}
}
$statusEntity = new \CCrmStatus('HONORIFIC');
$presentItems = \CCrmStatus::GetStatusList('HONORIFIC');
foreach ($items as $item) {
if (!isset($presentItems[$item['STATUS_ID']])) {
$statusEntity->Add($item);
}
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:40,代码来源:honorific.php
示例5: GetList
function GetList($arUserField)
{
$rsStatus = false;
if (CModule::IncludeModule('crm')) {
$arList = array();
$arStatuses = CCrmStatus::GetStatus($arUserField['SETTINGS']['ENTITY_TYPE']);
foreach ($arStatuses as $arStatus) {
$arList[] = array('ID' => $arStatus['STATUS_ID'], 'VALUE' => $arStatus['NAME']);
}
$rsStatus = new CDBResult();
$rsStatus->InitFromArray($arList);
}
return $rsStatus;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:14,代码来源:crm_usertypecrmstatus.php
示例6: initializeDemoData
/**
* @return array
*/
public function initializeDemoData(array $data)
{
if (!(isset($data['items']) && is_array($data['items']))) {
return $data;
}
$stages = \CCrmStatus::GetStatusList('DEAL_STAGE');
foreach ($data['items'] as &$item) {
$stageID = isset($item['ID']) ? $item['ID'] : '';
if ($stageID !== '' && isset($stages[$stageID])) {
$item['NAME'] = $stages[$stageID];
}
}
unset($item);
return $data;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:dealfunnelwidget.php
示例7: GetDocumentFields
public static function GetDocumentFields($documentType)
{
$arDocumentID = self::GetDocumentInfo($documentType . '_0');
if (empty($arDocumentID)) {
throw new CBPArgumentNullException('documentId');
}
__IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
$printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
$emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
$arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'COMPANY_TYPE' => array('Name' => GetMessage('CRM_FIELD_COMPANY_TYPE'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('COMPANY_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'INDUSTRY' => array('Name' => GetMessage('CRM_FIELD_INDUSTRY'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('INDUSTRY'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EMPLOYEES' => array('Name' => GetMessage('CRM_FIELD_EMPLOYEES'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EMPLOYEES'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'REVENUE' => array('Name' => GetMessage('CRM_FIELD_REVENUE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_LEGAL' => array('Name' => GetMessage('CRM_FIELD_ADDRESS_LEGAL'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BANKING_DETAILS' => array('Name' => GetMessage('CRM_FIELD_BANKING_DETAILS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "CONTACT_ID" => array("Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
$ar = CCrmFieldMulti::GetEntityTypeList();
foreach ($ar as $typeId => $arFields) {
$arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage("CRM_FIELD_MULTI_" . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
foreach ($arFields as $valueType => $valueName) {
$arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
$arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
}
}
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_COMPANY');
$CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
return $arResult;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:23,代码来源:crm_document_company.php
示例8: GetDocumentFields
public static function GetDocumentFields($documentType)
{
$arDocumentID = self::GetDocumentInfo($documentType . '_0');
if (empty($arDocumentID)) {
throw new CBPArgumentNullException('documentId');
}
__IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
$addressLabels = Bitrix\Crm\EntityAddress::getShortLabels();
$printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
$emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
$arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'NAME' => array('Name' => GetMessage('CRM_FIELD_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'LAST_NAME' => array('Name' => GetMessage('CRM_FIELD_LAST_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'SECOND_NAME' => array('Name' => GetMessage('CRM_FIELD_SECOND_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BIRTHDATE' => array('Name' => GetMessage('CRM_FIELD_BIRTHDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHOTO' => array('Name' => GetMessage('CRM_FIELD_PHOTO'), 'Type' => 'file', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'POST' => array('Name' => GetMessage('CRM_FIELD_POST'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'FULL_ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS' => array('Name' => $addressLabels['ADDRESS'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_2' => array('Name' => $addressLabels['ADDRESS_2'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_CITY' => array('Name' => $addressLabels['CITY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_POSTAL_CODE' => array('Name' => $addressLabels['POSTAL_CODE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_REGION' => array('Name' => $addressLabels['REGION'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_PROVINCE' => array('Name' => $addressLabels['PROVINCE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_COUNTRY' => array('Name' => $addressLabels['COUNTRY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'TYPE_ID' => array('Name' => GetMessage('CRM_FIELD_TYPE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('CONTACT_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'SOURCE_ID' => array('Name' => GetMessage('CRM_FIELD_SOURCE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('SOURCE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SOURCE_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_SOURCE_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "COMPANY_ID" => array("Name" => GetMessage("CRM_FIELD_COMPANY_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_CONTACT_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_CONTACT_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
$ar = CCrmFieldMulti::GetEntityTypeList();
foreach ($ar as $typeId => $arFields) {
$arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage('CRM_FIELD_MULTI_' . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
foreach ($arFields as $valueType => $valueName) {
$arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
$arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
}
}
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_CONTACT');
$CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
return $arResult;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:24,代码来源:crm_document_contact.php
示例9: intval
$arFields['~ASSIGNED_BY_FORMATTED_NAME'] = intval($arFields['~ASSIGNED_BY_ID']) > 0 ? CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~ASSIGNED_BY_LOGIN'], 'NAME' => $arFields['~ASSIGNED_BY_NAME'], 'LAST_NAME' => $arFields['~ASSIGNED_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~ASSIGNED_BY_SECOND_NAME']), true, false) : GetMessage('RESPONSIBLE_NOT_ASSIGNED');
$arFields['ASSIGNED_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~ASSIGNED_BY_FORMATTED_NAME']);
$arFields['~CREATED_BY_FORMATTED_NAME'] = CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~CREATED_BY_LOGIN'], 'NAME' => $arFields['~CREATED_BY_NAME'], 'LAST_NAME' => $arFields['~CREATED_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~CREATED_BY_SECOND_NAME']), true, false);
$arFields['CREATED_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~CREATED_BY_FORMATTED_NAME']);
$arFields['PATH_TO_USER_CREATOR'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arFields['ASSIGNED_BY']));
$arFields['~MODIFY_BY_FORMATTED_NAME'] = CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~MODIFY_BY_LOGIN'], 'NAME' => $arFields['~MODIFY_BY_NAME'], 'LAST_NAME' => $arFields['~MODIFY_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~MODIFY_BY_SECOND_NAME']), true, false);
$arFields['MODIFY_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~MODIFY_BY_FORMATTED_NAME']);
$arFields['PATH_TO_USER_MODIFIER'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arFields['MODIFY_BY']));
$arResult['ELEMENT'] = $arFields;
unset($arFields);
$arResult['FORM_ID'] = 'CRM_COMPANY_SHOW_V12';
$arResult['GRID_ID'] = 'CRM_COMPANY_LIST_V12';
$arResult['BACK_URL'] = $arParams['PATH_TO_COMPANY_LIST'];
$arResult['COMPANY_TYPE_LIST'] = CCrmStatus::GetStatusListEx('COMPANY_TYPE');
$arResult['EMPLOYEES_LIST'] = CCrmStatus::GetStatusListEx('EMPLOYEES');
$arResult['INDUSTRY_LIST'] = CCrmStatus::GetStatusListEx('INDUSTRY');
$enableInstantEdit = $arResult['ENABLE_INSTANT_EDIT'] = $arResult['CAN_EDIT'];
$readOnlyMode = !$enableInstantEdit;
$arResult['FIELDS'] = array();
$arResult['FIELDS']['tab_1'][] = array('id' => 'section_company_info', 'name' => GetMessage('CRM_SECTION_COMPANY_INFO'), 'type' => 'section', 'isTactile' => true);
// TITLE -->
// TITLE is displayed in sidebar. The field is added for COMPATIBILITY ONLY
if ($enableInstantEdit) {
$arResult['EDITABLE_FIELDS'][] = 'TITLE';
}
$arResult['FIELDS']['tab_1'][] = array('id' => 'TITLE', 'name' => GetMessage('CRM_FIELD_TITLE'), 'params' => array('size' => 50), 'value' => isset($arResult['ELEMENT']['~TITLE']) ? $arResult['ELEMENT']['~TITLE'] : '', 'type' => 'label', 'isTactile' => true);
// <-- TITLE
// ASSIGNED_BY_ID is displayed in sidebar. The field is added for COMPATIBILITY ONLY
if ($enableInstantEdit) {
$arResult['EDITABLE_FIELDS'][] = 'ASSIGNED_BY_ID';
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php
示例10: __CrmQuickPanelViewPrepareStatusEnumeration
function __CrmQuickPanelViewPrepareStatusEnumeration($statusTypeID, $statusID, $editable, &$entityContext)
{
$sourceItems = CCrmStatus::GetStatusList($statusTypeID);
$items = array();
$text = '';
foreach ($sourceItems as $k => $v) {
if (!is_string($k)) {
$k = (string) $k;
}
$items[] = array('ID' => $k, 'VALUE' => $v);
if ($text === '' && $statusID !== '' && $statusID === $k) {
$text = $v;
}
}
return array('type' => 'enumeration', 'editable' => $editable, 'data' => array('value' => $statusID, 'text' => $text, 'items' => $items));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:16,代码来源:component.php
示例11: CCrmUserType
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmDeal::$sUFEntityID);
$arResult['STAGE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_STAGE');
$arResult['CURRENCY_LIST'] = CCrmCurrencyHelper::PrepareListItems();
$arResult['FILTER'] = array();
$arResult['GRID_ID'] = 'CRM_DEAL_FUNNEL';
if (!$bInternal) {
$arResult['FILTER2LOGIC'] = array();
ob_start();
$GLOBALS['APPLICATION']->IncludeComponent('bitrix:crm.entity.selector', '', array('ENTITY_TYPE' => 'CONTACT', 'INPUT_NAME' => 'CONTACT_ID', 'INPUT_VALUE' => isset($_REQUEST['CONTACT_ID']) ? intval($_REQUEST['CONTACT_ID']) : '', 'FORM_NAME' => $arResult['GRID_ID'], 'MULTIPLE' => 'N', 'FILTER' => true), false, array('HIDE_ICONS' => 'Y'));
$sValContact = ob_get_contents();
ob_end_clean();
ob_start();
$GLOBALS['APPLICATION']->IncludeComponent('bitrix:crm.entity.selector', '', array('ENTITY_TYPE' => 'COMPANY', 'INPUT_NAME' => 'COMPANY_ID', 'INPUT_VALUE' => isset($_REQUEST['COMPANY_ID']) ? intval($_REQUEST['COMPANY_ID']) : '', 'FORM_NAME' => $arResult['GRID_ID'], 'MULTIPLE' => 'N', 'FILTER' => true), false, array('HIDE_ICONS' => 'Y'));
$sValCompany = ob_get_contents();
ob_end_clean();
$arResult['FILTER'] = array(array('id' => 'OPPORTUNITY', 'name' => GetMessage('CRM_COLUMN_OPPORTUNITY'), 'type' => 'number'), array('id' => 'CURRENCY_ID', 'name' => GetMessage('CRM_COLUMN_CURRENCY_ID'), 'type' => 'list', 'items' => array('' => '') + CCrmCurrencyHelper::PrepareListItems()), array('id' => 'PROBABILITY', 'name' => GetMessage('CRM_COLUMN_PROBABILITY'), 'type' => 'number'), array('id' => 'CLOSED', 'name' => GetMessage('CRM_COLUMN_CLOSED'), 'type' => 'list', 'items' => array('' => '', 'Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'))), array('id' => 'TYPE_ID', 'name' => GetMessage('CRM_COLUMN_TYPE_ID'), 'default' => 'Y', 'type' => 'list', 'items' => array('' => '') + CCrmStatus::GetStatusList('DEAL_TYPE')), array('id' => 'BEGINDATE', 'name' => GetMessage('CRM_COLUMN_BEGINDATE'), 'type' => 'date'), array('id' => 'CLOSEDATE', 'name' => GetMessage('CRM_COLUMN_CLOSEDATE'), 'type' => 'date'), array('id' => 'DATE_CREATE', 'name' => GetMessage('CRM_COLUMN_DATE_CREATE'), 'default' => 'Y', 'type' => 'date'), 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'), 'enable_settings' => false, 'type' => 'user'), array('id' => 'ASSIGNED_BY_ID', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY'), 'default' => 'Y', 'enable_settings' => false, 'type' => 'user'), array('id' => 'CONTACT_ID', 'name' => GetMessage('CRM_COLUMN_CONTACT_LIST'), 'type' => 'custom', 'value' => $sValContact), array('id' => 'COMPANY_ID', 'name' => GetMessage('CRM_COLUMN_COMPANY_LIST'), 'type' => 'custom', 'value' => $sValCompany));
$CCrmUserType->ListAddFilterFields($arResult['FILTER'], $arResult['FILTER2LOGIC'], $arResult['GRID_ID']);
$arResult['FILTER_PRESETS'] = array('filter_week' => array('name' => GetMessage('CRM_PRESET_WEEK'), 'fields' => array('DATE_MODIFY_datesel' => 'week')), 'filter_week_prev' => array('name' => GetMessage('CRM_PRESET_WEEK_PREV'), 'fields' => array('DATE_MODIFY_datesel' => 'week_ago')), 'filter_month' => array('name' => GetMessage('CRM_PRESET_MONTH'), 'fields' => array('DATE_MODIFY_datesel' => 'month')), 'filter_month_prev' => array('name' => GetMessage('CRM_PRESET_MONTH_PREV'), 'fields' => array('DATE_MODIFY_datesel' => 'month_ago')), 'filter_my_week' => array('name' => GetMessage('CRM_PRESET_MY_WEEK'), 'fields' => array('DATE_MODIFY_datesel' => 'week', "ASSIGNED_BY_ID" => __format_user4search(), "ASSIGNED_BY_ID[]" => $GLOBALS['USER']->GetID())), 'filter_my_week_ago' => array('name' => GetMessage('CRM_PRESET_MY_WEEK_AGO'), 'fields' => array('DATE_MODIFY_datesel' => 'week_ago', "ASSIGNED_BY_ID" => __format_user4search(), "ASSIGNED_BY_ID[]" => $GLOBALS['USER']->GetID())));
}
if ($arParams['USE_AMCHARTS']) {
$arResult['HEADERS'] = array(array('id' => 'TITLE', 'name' => GetMessage('CRM_COLUMN_TITLE'), 'sort' => false, 'default' => true, 'editable' => false), array('id' => 'PROCENT', 'name' => GetMessage('CRM_COLUMN_PROCENT'), 'sort' => false, 'default' => true, 'editable' => false, 'align' => 'right'), array('id' => 'COUNT_FUNNEL', 'name' => GetMessage('CRM_COLUMN_COUNT'), 'sort' => false, 'default' => true, 'editable' => false, 'align' => 'right'));
} else {
$arResult['HEADERS'] = array(array('id' => 'FUNNEL', 'name' => GetMessage('CRM_COLUMN_FUNNEL'), 'sort' => false, 'default' => false, 'editable' => false, 'align' => 'center'), array('id' => 'TITLE', 'name' => GetMessage('CRM_COLUMN_TITLE'), 'sort' => false, 'default' => true, 'editable' => false), array('id' => 'PROCENT', 'name' => GetMessage('CRM_COLUMN_PROCENT'), 'sort' => false, 'default' => true, 'editable' => false, 'align' => 'right'), array('id' => 'COUNT_FUNNEL', 'name' => GetMessage('CRM_COLUMN_COUNT'), 'sort' => false, 'default' => true, 'editable' => false, 'align' => 'right'));
}
$i = 0;
foreach ($arResult['CURRENCY_LIST'] as $k => $v) {
$arResult['HEADERS'][] = array('id' => $k, 'name' => GetMessage('CRM_COLUMN_SUMM', array('#CURRENCY#' => htmlspecialcharsbx($v))), 'sort' => false, 'default' => $i == 0, 'editable' => false, 'align' => 'right');
$i++;
}
$CGridOptions = new CCrmGridOptions($arResult['GRID_ID']);
if (isset($_REQUEST['clear_filter']) && $_REQUEST['clear_filter'] == 'Y') {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php
示例12: htmlspecialcharsbx
</span>
<span id="<?php
echo htmlspecialcharsbx($addContactButtonID);
?>
" class="bx-crm-edit-crm-entity-add"><?php
echo htmlspecialcharsbx(GetMessage('interface_form_add_btn_contact'));
?>
</span>
</span>
<?php
}
?>
<!--</div>-->
</div><?php
$dialogSettings['CONTACT'] = array('addButtonName' => GetMessage('interface_form_add_dialog_btn_add'), 'cancelButtonName' => GetMessage('interface_form_cancel'), 'title' => GetMessage('interface_form_add_contact_dlg_title'), 'lastNameTitle' => GetMessage('interface_form_add_contact_fld_last_name'), 'nameTitle' => GetMessage('interface_form_add_contact_fld_name'), 'secondNameTitle' => GetMessage('interface_form_add_contact_fld_second_name'), 'emailTitle' => GetMessage('interface_form_add_contact_fld_email'), 'phoneTitle' => GetMessage('interface_form_add_contact_fld_phone'), 'exportTitle' => GetMessage('interface_form_add_contact_fld_export'));
$dialogSettings['COMPANY'] = array('addButtonName' => GetMessage('interface_form_add_dialog_btn_add'), 'cancelButtonName' => GetMessage('interface_form_cancel'), 'title' => GetMessage('interface_form_add_company_dlg_title'), 'titleTitle' => GetMessage('interface_form_add_company_fld_title_name'), 'companyTypeTitle' => GetMessage('interface_form_add_conpany_fld_company_type'), 'industryTitle' => GetMessage('interface_form_add_company_fld_industry'), 'emailTitle' => GetMessage('interface_form_add_conpany_fld_email'), 'phoneTitle' => GetMessage('interface_form_add_company_fld_phone'), 'companyTypeItems' => CCrmEntitySelectorHelper::PrepareListItems(CCrmStatus::GetStatusList('COMPANY_TYPE')), 'industryItems' => CCrmEntitySelectorHelper::PrepareListItems(CCrmStatus::GetStatusList('INDUSTRY')));
?>
<script type="text/javascript">
BX.ready(
function()
{
var entitySelectorId = CRM.Set(
BX('<?php
echo CUtil::JSEscape($changeButtonID);
?>
'),
'<?php
echo CUtil::JSEscape($selectorID);
?>
',
'',
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php
示例13: PrepareEmployees
private static function PrepareEmployees()
{
return self::$EMPLOYEES !== null ? self::$EMPLOYEES : (self::$EMPLOYEES = CCrmStatus::GetStatusListEx('EMPLOYEES'));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:4,代码来源:template_mapper.php
示例14: PrepareEntityInfo
private static function PrepareEntityInfo($typeID, $ID, &$arRes, $options = null)
{
$enableEditUrl = is_array($options) && isset($options['ENABLE_EDIT_URL']) && $options['ENABLE_EDIT_URL'] === true;
switch ($typeID) {
case self::Lead:
$treatAsContact = false;
$treatAsCompany = false;
if (is_array($options)) {
$treatAsContact = isset($options['TREAT_AS_CONTACT']) && $options['TREAT_AS_CONTACT'];
$treatAsCompany = isset($options['TREAT_AS_COMPANY']) && $options['TREAT_AS_COMPANY'];
}
if ($treatAsContact) {
$result = array('TITLE' => CCrmLead::PrepareFormattedName($arRes), 'LEGEND' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '');
} elseif ($treatAsCompany) {
$result = array('TITLE' => isset($arRes['COMPANY_TITLE']) ? $arRes['COMPANY_TITLE'] : '', 'LEGEND' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '');
} else {
$result = array('TITLE' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '', 'LEGEND' => CCrmLead::PrepareFormattedName($arRes));
}
$result['RESPONSIBLE_ID'] = isset($arRes['ASSIGNED_BY_ID']) ? intval($arRes['ASSIGNED_BY_ID']) : 0;
$result['IMAGE_FILE_ID'] = 0;
$result['SHOW_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_lead_show'), array('lead_id' => $ID));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_lead_edit'), array('lead_id' => $ID));
}
return $result;
case self::Contact:
$result = array('TITLE' => CCrmContact::PrepareFormattedName($arRes), 'LEGEND' => isset($arRes['COMPANY_TITLE']) ? $arRes['COMPANY_TITLE'] : '', 'RESPONSIBLE_ID' => isset($arRes['ASSIGNED_BY_ID']) ? intval($arRes['ASSIGNED_BY_ID']) : 0, 'IMAGE_FILE_ID' => isset($arRes['PHOTO']) ? intval($arRes['PHOTO']) : 0, 'SHOW_URL' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_contact_show'), array('contact_id' => $ID)));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_contact_edit'), array('contact_id' => $ID));
}
return $result;
case self::Company:
if (self::$COMPANY_TYPE === null) {
self::$COMPANY_TYPE = CCrmStatus::GetStatusList('COMPANY_TYPE');
}
if (self::$COMPANY_INDUSTRY === null) {
self::$COMPANY_INDUSTRY = CCrmStatus::GetStatusList('INDUSTRY');
}
$legendParts = array();
$typeID = isset($arRes['COMPANY_TYPE']) ? $arRes['COMPANY_TYPE'] : '';
if ($typeID !== '' && isset(self::$COMPANY_TYPE[$typeID])) {
$legendParts[] = self::$COMPANY_TYPE[$typeID];
}
$industryID = isset($arRes['INDUSTRY']) ? $arRes['INDUSTRY'] : '';
if ($industryID !== '' && isset(self::$COMPANY_INDUSTRY[$industryID])) {
$legendParts[] = self::$COMPANY_INDUSTRY[$industryID];
}
$result = array('TITLE' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '', 'LEGEND' => !empty($legendParts) ? implode(', ', $legendParts) : '', 'RESPONSIBLE_ID' => isset($arRes['ASSIGNED_BY_ID']) ? intval($arRes['ASSIGNED_BY_ID']) : 0, 'IMAGE_FILE_ID' => isset($arRes['LOGO']) ? intval($arRes['LOGO']) : 0, 'SHOW_URL' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_company_show'), array('company_id' => $ID)));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_company_edit'), array('company_id' => $ID));
}
return $result;
case self::Deal:
$result = array('TITLE' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '', 'LEGEND' => '', 'RESPONSIBLE_ID' => isset($arRes['ASSIGNED_BY_ID']) ? intval($arRes['ASSIGNED_BY_ID']) : 0, 'IMAGE_FILE_ID' => 0, 'SHOW_URL' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_deal_show'), array('deal_id' => $ID)));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_deal_edit'), array('deal_id' => $ID));
}
return $result;
case self::Invoice:
$result = array('TITLE' => isset($arRes['ORDER_TOPIC']) ? $arRes['ORDER_TOPIC'] : '', 'LEGEND' => '', 'RESPONSIBLE_ID' => isset($arRes['RESPONSIBLE_ID']) ? intval($arRes['RESPONSIBLE_ID']) : 0, 'IMAGE_FILE_ID' => 0, 'SHOW_URL' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_invoice_show'), array('invoice_id' => $ID)));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_invoice_edit'), array('invoice_id' => $ID));
}
return $result;
case self::Quote:
$result = array('TITLE' => isset($arRes['TITLE']) ? $arRes['TITLE'] : '', 'LEGEND' => '', 'RESPONSIBLE_ID' => isset($arRes['ASSIGNED_BY_ID']) ? intval($arRes['ASSIGNED_BY_ID']) : 0, 'IMAGE_FILE_ID' => 0, 'SHOW_URL' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_quote_show'), array('quote_id' => $ID)));
if ($enableEditUrl) {
$result['EDIT_URL'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_quote_edit'), array('quote_id' => $ID));
}
return $result;
}
return null;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:73,代码来源:crm_owner_type.php
示例15: showField
public function showField($arField, $arUF = array())
{
$strResult = "";
switch ($arField["FORMAT"]) {
case "LEAD_PROGRESS":
if (!empty($arField["VALUE"])) {
$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 crm-feed-info-bar-cont">';
$strResult .= CCrmViewHelper::RenderLeadStatusControl(array('ENTITY_TYPE_NAME' => CCrmOwnerType::Lead, 'REGISTER_SETTINGS' => true, 'PREFIX' => "", 'ENTITY_ID' => CCrmLiveFeedEntity::Lead, 'CURRENT_ID' => $arField["VALUE"], 'READ_ONLY' => true));
$strResult .= '</span>';
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "DEAL_PROGRESS":
if (!empty($arField["VALUE"])) {
$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 crm-feed-info-bar-cont">';
$strResult .= CCrmViewHelper::RenderDealStageControl(array('ENTITY_TYPE_NAME' => CCrmOwnerType::Deal, 'REGISTER_SETTINGS' => true, 'PREFIX' => "", 'ENTITY_ID' => CCrmLiveFeedEntity::Deal, 'CURRENT_ID' => $arField["VALUE"], 'READ_ONLY' => true));
$strResult .= '</span>';
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "INVOICE_PROGRESS":
if (!empty($arField["VALUE"])) {
$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 crm-feed-info-bar-cont">';
$strResult .= CCrmViewHelper::RenderInvoiceStatusControl(array('ENTITY_TYPE_NAME' => CCrmOwnerType::Invoice, 'REGISTER_SETTINGS' => true, 'PREFIX' => "", 'ENTITY_ID' => CCrmLiveFeedEntity::Invoice, 'CURRENT_ID' => $arField["VALUE"], 'READ_ONLY' => true));
$strResult .= "</span>";
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "LEAD_STATUS":
$infos = CCrmStatus::GetStatus('STATUS');
if (!empty($arField["VALUE"]) && array_key_exists($arField["VALUE"], $infos)) {
$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 .= $infos[$arField["VALUE"]]["NAME"];
$strResult .= "</span>";
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "PERSON_NAME":
if (is_array($arField["VALUE"])) {
$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 .= CUser::FormatName(CSite::GetNameFormat(), $arField["VALUE"]);
$strResult .= "</span>";
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "PERSON_ID":
if (intval($arField["VALUE"]) > 0) {
$dbUser = CUser::GetByID(intval($arField["VALUE"]));
if ($arUser = $dbUser->GetNext()) {
$strResult .= "#row_begin#";
$strResult .= "#cell_begin_left#";
$st
|
请发表评论