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


PHP CCrmOwnerType::GetDescriptions方法代码示例

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


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

示例1: processMethodRequest

 public function processMethodRequest($name, $nameDetails, $arParams, $nav, $server)
 {
     $descriptions = null;
     $name = strtoupper($name);
     if ($name === 'OWNERTYPE') {
         $descriptions = CCrmOwnerType::GetDescriptions(array(CCrmOwnerType::Lead, CCrmOwnerType::Deal, CCrmOwnerType::Contact, CCrmOwnerType::Company));
     } elseif ($name === 'CONTENTTYPE') {
         $descriptions = CCrmContentType::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYTYPE') {
         $descriptions = CCrmActivityType::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYPRIORITY') {
         $descriptions = CCrmActivityPriority::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYDIRECTION') {
         $descriptions = CCrmActivityDirection::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYNOTIFYTYPE') {
         $descriptions = CCrmActivityNotifyType::GetAllDescriptions();
     }
     if (!is_array($descriptions)) {
         return parent::processMethodRequest($name, $nameDetails, $arParams, $nav, $server);
     }
     $result = array();
     foreach ($descriptions as $k => &$v) {
         $result[] = array('ID' => $k, 'NAME' => $v);
     }
     unset($v);
     return $result;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:27,代码来源:restservice.php

示例2: elseif

            }
        }
    } elseif ($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['delete'])) {
        if (CCrmMailTemplate::Exists($elementID) && !CCrmMailTemplate::Delete($elementID)) {
            $errors = CCrmMailTemplate::GetErrorMessages();
            if (empty($errors)) {
                $errors[] = GetMessage('CRM_MAIL_TEMPLATE_DELETE_UNKNOWN_ERROR');
            }
            ShowError(implode("\n", $errors));
            return;
        }
        LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_MAIL_TEMPLATE_LIST']));
    }
}
$arResult['ELEMENT_ID'] = $elementID;
$arResult['ELEMENT'] = $element;
$isEditMode = $elementID > 0;
$arResult['FORM_ID'] = $arResult['GRID_ID'] = 'CRM_MAIL_TEMPLATE_EDIT';
$arResult['BACK_URL'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_MAIL_TEMPLATE_LIST'], array());
$arResult['FIELDS']['tab_1'][] = array('ID' => 'TITLE', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_TITLE'), 'VALUE' => isset($element['TITLE']) ? $element['TITLE'] : '', 'REQUIRED' => true);
$arResult['FIELDS']['tab_1'][] = array('ID' => 'SORT', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_SORT'), 'VALUE' => isset($element['SORT']) ? intval($element['SORT']) : 100);
if (CCrmPerms::IsAdmin()) {
    $arResult['FIELDS']['tab_1'][] = array('ID' => 'SCOPE', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_SCOPE'), 'VALUE' => isset($element['SCOPE']) ? $element['SCOPE'] : CCrmMailTemplateScope::Personal, 'ALL_VALUES' => CCrmMailTemplateScope::GetAllDescriptions());
}
$arResult['FIELDS']['tab_1'][] = array('ID' => 'IS_ACTIVE', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_IS_ACTIVE'), 'VALUE' => isset($element['IS_ACTIVE']) && $element['IS_ACTIVE'] === 'Y' ? 'Y' : 'N');
$arResult['FIELDS']['tab_1'][] = array('ID' => 'EMAIL_FROM', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_EMAIL_FROM'), 'VALUE' => isset($element['EMAIL_FROM']) ? $element['EMAIL_FROM'] : '');
$arResult['FIELDS']['tab_1'][] = array('ID' => 'SUBJECT', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_SUBJECT'), 'VALUE' => isset($element['SUBJECT']) ? $element['SUBJECT'] : '');
$ownerTypes = CCrmOwnerType::GetDescriptions(array(CCrmOwnerType::Lead, CCrmOwnerType::Deal, CCrmOwnerType::Contact, CCrmOwnerType::Company));
$arResult['FIELDS']['tab_1'][] = array('ID' => 'ENTITY_TYPE_ID', 'NAME' => GetMessage('CRM_MAIL_ENTITY_TYPE'), 'VALUE' => isset($element['ENTITY_TYPE_ID']) ? $element['ENTITY_TYPE_ID'] : CCrmOwnerType::Lead, 'ALL_VALUES' => $ownerTypes, 'REQUIRED' => true);
$arResult['FIELDS']['tab_1'][] = array('ID' => 'BODY', 'NAME' => GetMessage('CRM_MAIL_TEMPLATE_BODY'), 'VALUE' => isset($element['BODY']) ? $element['BODY'] : '');
$this->IncludeComponentTemplate();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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