當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCrmStatus::EnableDepricatedTypes方法代碼示例

本文整理匯總了PHP中CCrmStatus::EnableDepricatedTypes方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCrmStatus::EnableDepricatedTypes方法的具體用法?PHP CCrmStatus::EnableDepricatedTypes怎麽用?PHP CCrmStatus::EnableDepricatedTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCrmStatus的用法示例。


在下文中一共展示了CCrmStatus::EnableDepricatedTypes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: isset

            if ($oldCalltoSettings['URL_TEMPLATE'] != $newCalltoSettings['URL_TEMPLATE'] || $oldCalltoSettings['CLICK_HANDLER'] != $newCalltoSettings['CLICK_HANDLER'] || $oldCalltoSettings['NORMALIZE_NUMBER'] != $newCalltoSettings['NORMALIZE_NUMBER']) {
                CCrmCallToUrl::SetCustomSettings($newCalltoSettings);
                $isCallSettingsChanged = true;
            }
            if (defined('BX_COMP_MANAGED_CACHE') && $isCallSettingsChanged) {
                $GLOBALS['CACHE_MANAGER']->ClearByTag('CRM_CALLTO_SETTINGS');
            }
            $entityAddressFormatID = isset($_POST['ENTITY_ADDRESS_FORMAT_ID']) ? (int) $_POST['ENTITY_ADDRESS_FORMAT_ID'] : \Bitrix\Crm\Format\EntityAddressFormatter::Dflt;
            \Bitrix\Crm\Format\EntityAddressFormatter::setFormatID($entityAddressFormatID);
            $personFormatID = isset($_POST['PERSON_NAME_FORMAT_ID']) ? (int) $_POST['PERSON_NAME_FORMAT_ID'] : \Bitrix\Crm\Format\PersonNameFormatter::Dflt;
            \Bitrix\Crm\Format\PersonNameFormatter::setFormatID($personFormatID);
            $dupControl->enabledFor(CCrmOwnerType::Lead, isset($_POST['ENABLE_LEAD_DUP_CONTROL']) && strtoupper($_POST['ENABLE_LEAD_DUP_CONTROL']) === 'Y');
            $dupControl->enabledFor(CCrmOwnerType::Contact, isset($_POST['ENABLE_CONTACT_DUP_CONTROL']) && strtoupper($_POST['ENABLE_CONTACT_DUP_CONTROL']) === 'Y');
            $dupControl->enabledFor(CCrmOwnerType::Company, isset($_POST['ENABLE_COMPANY_DUP_CONTROL']) && strtoupper($_POST['ENABLE_COMPANY_DUP_CONTROL']) === 'Y');
            $dupControl->save();
            CCrmStatus::EnableDepricatedTypes(isset($_POST['ENABLE_DEPRECATED_STATUSES']) && strtoupper($_POST['ENABLE_DEPRECATED_STATUSES']) === 'Y');
            \Bitrix\Crm\Settings\DealSettings::enableCloseDateSync(isset($_POST['REFRESH_DEAL_CLOSEDATE']) && strtoupper($_POST['REFRESH_DEAL_CLOSEDATE']) === 'Y');
            if ($_POST['DEAL_DEFAULT_LIST_VIEW']) {
                \Bitrix\Crm\Settings\DealSettings::setDefaultListViewID($_POST['DEAL_DEFAULT_LIST_VIEW']);
            }
            LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_SM_CONFIG'], array()));
        }
    }
}
$arResult['FORM_ID'] = 'CRM_SM_CONFIG';
$arResult['BACK_URL'] = $arParams['PATH_TO_SM_CONFIG'];
$arResult['FIELDS'] = array();
$arResult['FIELDS']['tab_deal_config'][] = array('id' => 'DEAL_DEFAULT_LIST_VIEW', 'name' => GetMessage('CRM_FIELD_DEAL_DEFAULT_LIST_VIEW'), 'items' => \Bitrix\Crm\Settings\DealSettings::getViewDescriptions(), 'type' => 'list', 'value' => \Bitrix\Crm\Settings\DealSettings::getDefaultListViewID(), 'required' => false);
$arResult['FIELDS']['tab_deal_config'][] = array('id' => 'REFRESH_DEAL_CLOSEDATE', 'name' => GetMessage('CRM_FIELD_REFRESH_DEAL_CLOSEDATE'), 'type' => 'checkbox', 'value' => \Bitrix\Crm\Settings\DealSettings::isCloseDateSyncEnabled(), 'required' => false);
$arResult['FIELDS']['tab_activity_config'][] = array('id' => 'CALENDAR_DISPLAY_COMPLETED_CALLS', 'name' => GetMessage('CRM_FIELD_DISPLAY_COMPLETED_CALLS_IN_CALENDAR'), 'type' => 'checkbox', 'value' => CCrmActivityCalendarSettings::GetValue(CCrmActivityCalendarSettings::DisplayCompletedCalls, true), 'required' => false);
$arResult['FIELDS']['tab_activity_config'][] = array('id' => 'CALENDAR_DISPLAY_COMPLETED_MEETINGS', 'name' => GetMessage('CRM_FIELD_DISPLAY_COMPLETED_MEETINGS_IN_CALENDAR'), 'type' => 'checkbox', 'value' => CCrmActivityCalendarSettings::GetValue(CCrmActivityCalendarSettings::DisplayCompletedMeetings, true), 'required' => false);
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:component.php


注:本文中的CCrmStatus::EnableDepricatedTypes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。