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


PHP CBPHelper::ConvertUserToPrintableForm方法代码示例

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


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

示例1: __bwl1_ParseStringParameterTmp

 function __bwl1_ParseStringParameterTmp($matches)
 {
     $result = "";
     if ($matches[1] == "user") {
         $user = $matches[2];
         $l = strlen("user_");
         if (substr($user, 0, $l) == "user_") {
             $result = htmlspecialcharsbx(CBPHelper::ConvertUserToPrintableForm(intval(substr($user, $l))));
         } else {
             $result = $GLOBALS["__bwl1_ParseStringParameterTmp_arAllowableUserGroups"][$user];
         }
     } elseif ($matches[1] == "group") {
         $result = $GLOBALS["__bwl1_ParseStringParameterTmp_arAllowableUserGroups"][$matches[2]];
     } else {
         $result = $matches[0];
     }
     return $result;
 }
开发者ID:vim84,项目名称:b-markt,代码行数:18,代码来源:component.php

示例2: parseStringParameterMatches

 public static function parseStringParameterMatches($matches, $documentType = null)
 {
     $result = "";
     $documentType = is_array($documentType) ? array_filter($documentType) : null;
     if ($matches[1] == "user") {
         $user = $matches[2];
         $l = strlen("user_");
         if (substr($user, 0, $l) == "user_") {
             $result = CBPHelper::ConvertUserToPrintableForm(intval(substr($user, $l)));
         } elseif (strpos($user, 'group_') === 0) {
             $result = htmlspecialcharsbx(CBPHelper::getExtendedGroupName($user));
         } elseif ($documentType) {
             $v = implode(",", $documentType);
             if (!array_key_exists($v, self::$userGroupsCache)) {
                 self::$userGroupsCache[$v] = CBPDocument::GetAllowableUserGroups($documentType);
             }
             $result = self::$userGroupsCache[$v][$user];
         } else {
             $result = $user;
         }
     } elseif ($matches[1] == "group") {
         if (strpos($matches[2], 'group_') === 0) {
             $result = htmlspecialcharsbx(CBPHelper::getExtendedGroupName($matches[2]));
         } elseif ($documentType) {
             $v = implode(",", $documentType);
             if (!array_key_exists($v, self::$userGroupsCache)) {
                 self::$userGroupsCache[$v] = CBPDocument::GetAllowableUserGroups($documentType);
             }
             $result = self::$userGroupsCache[$v][$matches[2]];
         } else {
             $result = $matches[2];
         }
     } else {
         $result = $matches[0];
     }
     return $result;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:37,代码来源:trackingservice.php

示例3: GetFieldValuePrintable

 public static function GetFieldValuePrintable($fieldName, $fieldType, $result)
 {
     $newResult = null;
     switch ($fieldType) {
         case "user":
             if (is_array($result)) {
                 $newResult = array();
                 foreach ($result as $r) {
                     $newResult[] = CBPHelper::ConvertUserToPrintableForm($r);
                 }
             } else {
                 $newResult = CBPHelper::ConvertUserToPrintableForm($result);
             }
             break;
         case "file":
             if (is_array($result)) {
                 $newResult = array();
                 foreach ($result as $r) {
                     $r = intval($r);
                     $dbImg = CFile::GetByID($r);
                     if ($arImg = $dbImg->Fetch()) {
                         $newResult[] = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $r . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                     }
                 }
             } else {
                 $result = intval($result);
                 $dbImg = CFile::GetByID($result);
                 if ($arImg = $dbImg->Fetch()) {
                     $newResult = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $result . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                 }
             }
             break;
         default:
             $newResult = $result;
     }
     return $newResult;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:37,代码来源:helper.php

示例4: __bwl_ParseStringParameterTmp1

 function __bwl_ParseStringParameterTmp1($matches, $documentType)
 {
     static $varCache = array();
     $result = "";
     if ($matches[1] == "user") {
         $user = $matches[2];
         $l = strlen("user_");
         if (substr($user, 0, $l) == "user_") {
             $result = htmlspecialcharsbx(CBPHelper::ConvertUserToPrintableForm(intval(substr($user, $l))));
         } else {
             $v = implode(",", $documentType);
             if (!array_key_exists($v, $varCache)) {
                 $varCache[$v] = CBPDocument::GetAllowableUserGroups($documentType);
             }
             $result = $varCache[$v][$user];
         }
     } elseif ($matches[1] == "group") {
         $v = implode(",", $documentType);
         if (!array_key_exists($v, $varCache)) {
             $varCache[$v] = CBPDocument::GetAllowableUserGroups($documentType);
         }
         $result = $varCache[$v][$matches[2]];
     } else {
         $result = $matches[0];
     }
     return $result;
 }
开发者ID:vim84,项目名称:b-markt,代码行数:27,代码来源:component.php

示例5: getPrintable

 /**
  * @param int $userID  - ID пользователя
  * @return string в формате БП - по умолчанию только Фамилия Имя - почта
  */
 public static function getPrintable($userID)
 {
     return CBPHelper::ConvertUserToPrintableForm($userID);
 }
开发者ID:st7art22,项目名称:bitrix,代码行数:8,代码来源:cuserwrapper.php


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