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


PHP CCrmOwnerType::GetDescription方法代码示例

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


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

示例1: LocalRedirect

        }
        LocalRedirect(CHTTP::urlDeleteParams($curPageUrl, array('conv')));
    }
}
$gridOptions = new CCrmGridOptions($arResult['GRID_ID']);
$gridSorting = $gridOptions->GetSorting(array('sort' => array('SORT' => 'asc'), 'vars' => array('by' => 'by', 'order' => 'order')));
$sort = $arResult['SORT'] = $gridSorting['sort'];
$arResult['SORT_VARS'] = $gridSorting['vars'];
$items = array();
$dbResult = CAllCrmMailTemplate::GetList($sort, array('LOGIC' => 'OR', '=OWNER_ID' => $userID, 'SCOPE' => CCrmMailTemplateScope::Common));
$count = 0;
while ($fields = $dbResult->GetNext()) {
    $ID = intval($fields['~ID']);
    $fields['~OWNER_FORMATTED_NAME'] = CUser::FormatName($arParams['NAME_TEMPLATE'], array('LOGIN' => $fields['~OWNER_LOGIN'], 'NAME' => $fields['~OWNER_NAME'], 'SECOND_NAME' => $fields['~OWNER_SECOND_NAME'], 'LAST_NAME' => $fields['~OWNER_LAST_NAME']), true, false);
    $fields['OWNER_FORMATTED_NAME'] = htmlspecialcharsbx($fields['~OWNER_FORMATTED_NAME']);
    $fields['~ENTITY_TYPE_NAME'] = isset($fields['~ENTITY_TYPE_ID']) ? CCrmOwnerType::GetDescription($fields['~ENTITY_TYPE_ID']) : '';
    $fields['ENTITY_TYPE_NAME'] = htmlspecialcharsbx($fields['~ENTITY_TYPE_NAME']);
    $fields['~SCOPE_NAME'] = isset($fields['~SCOPE']) ? CCrmMailTemplateScope::GetDescription($fields['~SCOPE']) : '';
    $fields['SCOPE_NAME'] = htmlspecialcharsbx($fields['~SCOPE_NAME']);
    $fields['CAN_EDIT'] = $fields['CAN_DELETE'] = $userID === intval($fields['~OWNER_ID']);
    $fields['PATH_TO_EDIT'] = $fields['PATH_TO_DELETE'] = '';
    if ($fields['CAN_EDIT']) {
        $fields['PATH_TO_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_MAIL_TEMPLATE_EDIT'], array('element_id' => $ID));
    }
    if ($fields['CAN_DELETE']) {
        $fields['PATH_TO_DELETE'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_MAIL_TEMPLATE_LIST'], array('element_id' => $ID)), array('action_' . $arResult['GRID_ID'] => 'delete', 'ID' => $ID, 'sessid' => bitrix_sessid()));
    }
    $items[] = $fields;
    $count++;
}
$arResult['ROWS_COUNT'] = $count;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例2: getLocalizedMessage

 public function getLocalizedMessage()
 {
     Main\Localization\Loc::loadMessages(__FILE__);
     $code = $this->getCode();
     $entityTypeID = $this->getTargetEntityTypeID();
     $entityTypeName = \CCrmOwnerType::ResolveName($entityTypeID);
     if ($code === EntityConversionException::NOT_FOUND) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_NOT_FOUND");
     } elseif ($code === EntityConversionException::EMPTY_FIELDS) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_EMPTY_FIELDS");
     } elseif ($code === EntityConversionException::HAS_WORKFLOWS) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_HAS_WORKFLOWS");
     } elseif ($code === EntityConversionException::AUTOCREATION_DISABLED) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_AUTOCREATION_DISABLED");
     } elseif ($code === EntityConversionException::INVALID_FIELDS) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_INVALID_FIELDS") . preg_replace('/<br\\s*\\/?>/i', "\r\n", $this->extMessage);
     } elseif ($code === EntityConversionException::CREATE_DENIED) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_CREATE_DENIED");
     } elseif ($code === EntityConversionException::CREATE_FAILED) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_CREATE_FAILED") . preg_replace('/<br\\s*\\/?>/i', "\r\n", $this->extMessage);
     } elseif ($code === EntityConversionException::READ_DENIED) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_READ_DENIED");
     } elseif ($code === EntityConversionException::UPDATE_DENIED) {
         return GetMessage("CRM_CONV_EX_{$entityTypeName}_UPDATE_DENIED");
     } elseif ($code === EntityConversionException::NOT_SUPPORTED) {
         return GetMessage('CRM_CONV_EX_ENTITY_NOT_SUPPORTED', array('#ENTITY_TYPE_NAME#' => \CCrmOwnerType::GetDescription($entityTypeID)));
     }
     return $this->getMessage();
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:29,代码来源:entityconversionexception.php


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