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


PHP CBPHelper::UsersArrayToString方法代码示例

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


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

示例1: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $documentService = $runtime->GetService("DocumentService");
     $arAllowableOperations = $documentService->GetAllowableOperations($documentType);
     if (!is_array($arCurrentValues)) {
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         if (is_array($arCurrentActivity["Properties"]) && array_key_exists("Permission", $arCurrentActivity["Properties"])) {
             foreach ($arAllowableOperations as $operationKey => $operationValue) {
                 $current = $documentService->toExternalOperations($documentType, $arCurrentActivity["Properties"]["Permission"]);
                 $arCurrentValues["permission_" . $operationKey] = CBPHelper::UsersArrayToString($current[$operationKey], $arWorkflowTemplate, $documentType);
             }
         }
         $arCurrentValues['set_mode'] = CBPSetPermissionsMode::Clear;
         $arCurrentValues['set_scope'] = CBPSetPermissionsMode::ScopeWorkflow;
         // old style override
         if (array_key_exists("Rewrite", $arCurrentActivity["Properties"]) && $arCurrentActivity["Properties"]["Rewrite"] == "N") {
             $arCurrentValues['set_mode'] = CBPSetPermissionsMode::Hold;
         }
         if (array_key_exists("SetMode", $arCurrentActivity["Properties"]) && $arCurrentActivity["Properties"]["SetMode"] !== false) {
             $arCurrentValues["set_mode"] = $arCurrentActivity["Properties"]["SetMode"];
         }
         if (array_key_exists("SetScope", $arCurrentActivity["Properties"])) {
             $arCurrentValues["set_scope"] = $arCurrentActivity["Properties"]["SetScope"];
         }
         $arCurrentValues['is_extended_mode'] = $documentService->isExtendedPermsSupported($documentType);
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arAllowableOperations" => $arAllowableOperations, "arCurrentValues" => $arCurrentValues, "formName" => $formName));
 }
开发者ID:Satariall,项目名称:izurit,代码行数:29,代码来源:setpermissionsactivity.php

示例2: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $arMap = array("MessageUserFrom" => "message_user_from", "MessageUserTo" => "message_user_to", "MessageText" => "message_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"])) {
                     if ($k == "MessageUserFrom" || $k == "MessageUserTo") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k], $arWorkflowTemplate, $documentType);
                     } else {
                         $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, "formName" => $formName));
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:32,代码来源:socnetmessageactivity.php

示例3: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $documentService = $runtime->GetService("DocumentService");
     $arAllowableOperations = $documentService->GetAllowableOperations($documentType);
     if (!is_array($arCurrentValues)) {
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         if (is_array($arCurrentActivity["Properties"]) && array_key_exists("Permission", $arCurrentActivity["Properties"])) {
             foreach ($arAllowableOperations as $operationKey => $operationValue) {
                 $arCurrentValues["permission_" . $operationKey] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"]["Permission"][$operationKey], $arWorkflowTemplate, $documentType);
             }
         }
         if (array_key_exists("Rewrite", $arCurrentActivity["Properties"])) {
             $arCurrentValues["rewrite"] = $arCurrentActivity["Properties"]["Rewrite"] == "N" ? "N" : "Y";
         } else {
             $arCurrentValues["rewrite"] = "Y";
         }
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arAllowableOperations" => $arAllowableOperations, "arCurrentValues" => $arCurrentValues, "formName" => $formName));
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:20,代码来源:setpermissionsactivity.php

示例4: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "", $form = null, $siteId = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $arMap = array("AbsenceUser" => "absence_user", "AbsenceName" => "absence_name", "AbsenceDesrc" => "absence_desrc", "AbsenceFrom" => "absence_from", "AbsenceTo" => "absence_to", "AbsenceState" => "absence_state", "AbsenceFinishState" => "absence_finish_state", "AbsenceType" => "absence_type");
     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"])) {
                     if ($k == "AbsenceUser") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k], $arWorkflowTemplate, $documentType);
                     } else {
                         $arCurrentValues[$arMap[$k]] = $arCurrentActivity["Properties"][$k];
                     }
                 } else {
                     $arCurrentValues[$arMap[$k]] = "";
                 }
             }
         } else {
             foreach ($arMap as $k => $v) {
                 $arCurrentValues[$arMap[$k]] = "";
             }
         }
     }
     $absenceIblockId = COption::GetOptionInt("intranet", 'iblock_absence', 0, $siteId);
     $arAbsenceTypes = array();
     $dbTypeRes = CIBlockPropertyEnum::GetList(array("SORT" => "ASC", "VALUE" => "ASC"), array('IBLOCK_ID' => $absenceIblockId, 'PROPERTY_ID' => 'ABSENCE_TYPE'));
     while ($arTypeValue = $dbTypeRes->GetNext()) {
         $arAbsenceTypes[$arTypeValue['XML_ID']] = $arTypeValue['VALUE'];
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "formName" => $formName, "arAbsenceTypes" => $arAbsenceTypes));
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:38,代码来源:absenceactivity.php

示例5: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $arMap = array("Users" => "review_users", "ApproveType" => "approve_type", "OverdueDate" => "review_overdue_date", "Name" => "review_name", "Description" => "review_description", "Parameters" => "review_parameters", "StatusMessage" => "status_message", "SetStatusMessage" => "set_status_message", "TaskButtonMessage" => "task_button_message", "CommentLabelMessage" => "comment_label_message", "ShowComment" => "show_comment", "TimeoutDuration" => "timeout_duration", "TimeoutDurationType" => "timeout_duration_type", "AccessControl" => "access_control");
     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"])) {
                     if ($k == "Users") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k], $arWorkflowTemplate, $documentType);
                     } elseif ($k == "TimeoutDuration") {
                         $arCurrentValues["timeout_duration"] = $arCurrentActivity["Properties"]["TimeoutDuration"];
                         if (!preg_match('#^{=[A-Za-z0-9_]+:[A-Za-z0-9_]+}$#i', $arCurrentValues["timeout_duration"]) && !array_key_exists("TimeoutDurationType", $arCurrentActivity["Properties"])) {
                             $arCurrentValues["timeout_duration"] = intval($arCurrentValues["timeout_duration"]);
                             $arCurrentValues["timeout_duration_type"] = "s";
                             if ($arCurrentValues["timeout_duration"] % (3600 * 24) == 0) {
                                 $arCurrentValues["timeout_duration"] = $arCurrentValues["timeout_duration"] / (3600 * 24);
                                 $arCurrentValues["timeout_duration_type"] = "d";
                             } elseif ($arCurrentValues["timeout_duration"] % 3600 == 0) {
                                 $arCurrentValues["timeout_duration"] = $arCurrentValues["timeout_duration"] / 3600;
                                 $arCurrentValues["timeout_duration_type"] = "h";
                             } elseif ($arCurrentValues["timeout_duration"] % 60 == 0) {
                                 $arCurrentValues["timeout_duration"] = $arCurrentValues["timeout_duration"] / 60;
                                 $arCurrentValues["timeout_duration_type"] = "m";
                             }
                         }
                     } else {
                         $arCurrentValues[$arMap[$k]] = $arCurrentActivity["Properties"][$k];
                     }
                 } else {
                     if (!is_array($arCurrentValues) || !array_key_exists($arMap[$k], $arCurrentValues)) {
                         $arCurrentValues[$arMap[$k]] = "";
                     }
                 }
             }
         } else {
             foreach ($arMap as $k => $v) {
                 $arCurrentValues[$arMap[$k]] = "";
             }
         }
     }
     if (strlen($arCurrentValues['status_message']) <= 0) {
         $arCurrentValues['status_message'] = GetMessage("BPAR_ACT_INFO");
     }
     if (strlen($arCurrentValues['comment_label_message']) <= 0) {
         $arCurrentValues['comment_label_message'] = GetMessage("BPAR_ACT_COMMENT");
     }
     if (strlen($arCurrentValues['task_button_message']) <= 0) {
         $arCurrentValues['task_button_message'] = GetMessage("BPAR_ACT_BUTTON2");
     }
     if (strlen($arCurrentValues["timeout_duration_type"]) <= 0) {
         $arCurrentValues["timeout_duration_type"] = "s";
     }
     $documentService = $runtime->GetService("DocumentService");
     $arDocumentFields = $documentService->GetDocumentFields($documentType);
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "arDocumentFields" => $arDocumentFields, "formName" => $formName));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:64,代码来源:reviewactivity.php

示例6: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $defaultValue, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $documentService = $runtime->GetService("DocumentService");
     $arDocumentFieldsTmp = $documentService->GetDocumentFields($documentType);
     $arFieldTypes = $documentService->GetDocumentFieldTypes($documentType);
     if (!is_array($arCurrentValues)) {
         $arCurrentValues = array();
         if (is_array($defaultValue)) {
             $i = 0;
             foreach ($defaultValue as $value) {
                 if (strlen($arCurrentValues["field_condition_count"]) > 0) {
                     $arCurrentValues["field_condition_count"] .= ",";
                 }
                 $arCurrentValues["field_condition_count"] .= $i;
                 $arCurrentValues["field_condition_field_" . $i] = $value[0];
                 $arCurrentValues["field_condition_condition_" . $i] = $value[1];
                 $arCurrentValues["field_condition_value_" . $i] = $value[2];
                 $arCurrentValues["field_condition_joiner_" . $i] = $value[3];
                 if ($arDocumentFieldsTmp[$arCurrentValues["field_condition_field_" . $i]]["BaseType"] == "user" && $arDocumentFieldsTmp[$arCurrentValues["field_condition_field_" . $i]]["Type"] != 'S:employee') {
                     if (!is_array($arCurrentValues["field_condition_value_" . $i])) {
                         $arCurrentValues["field_condition_value_" . $i] = array($arCurrentValues["field_condition_value_" . $i]);
                     }
                     $arCurrentValues["field_condition_value_" . $i] = CBPHelper::UsersArrayToString($arCurrentValues["field_condition_value_" . $i], $arWorkflowTemplate, $documentType);
                 }
                 $i++;
             }
         }
     } else {
         $arFieldConditionCount = explode(",", $arCurrentValues["field_condition_count"]);
         foreach ($arFieldConditionCount as $i) {
             if (intval($i) . "!" != $i . "!") {
                 continue;
             }
             $i = intval($i);
             if (!array_key_exists("field_condition_field_" . $i, $arCurrentValues) || strlen($arCurrentValues["field_condition_field_" . $i]) <= 0) {
                 continue;
             }
             $arErrors = array();
             $arCurrentValues["field_condition_value_" . $i] = $documentService->GetFieldInputValue($documentType, $arDocumentFieldsTmp[$arCurrentValues["field_condition_field_" . $i]], "field_condition_value_" . $i, $arCurrentValues, $arErrors);
         }
     }
     $arDocumentFields = array();
     foreach ($arDocumentFieldsTmp as $key => $value) {
         //if (!$value["Filterable"])
         //	continue;
         $arDocumentFields[$key] = $value;
     }
     $javascriptFunctions = $documentService->GetJSFunctionsForFields($documentType, "objFieldsFC", $arDocumentFields, $arFieldTypes);
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arDocumentFields" => $arDocumentFields, "arCurrentValues" => $arCurrentValues, "formName" => $formName, "arFieldTypes" => $arFieldTypes, "javascriptFunctions" => $javascriptFunctions, 'documentService' => $documentService, 'documentType' => $documentType));
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:51,代码来源:fieldcondition.php

示例7: GetFieldInputValuePrintable

 public static function GetFieldInputValuePrintable($documentType, $arFieldType, $fieldValue)
 {
     $result = $fieldValue;
     switch ($arFieldType['Type']) {
         case "user":
             $result = CBPHelper::UsersArrayToString($fieldValue, null, $documentType);
             break;
         case "bool":
             if (is_array($fieldValue)) {
                 $result = array();
                 foreach ($fieldValue as $r) {
                     $result[] = strtoupper($r) == "Y" ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO");
                 }
             } else {
                 $result = strtoupper($fieldValue) == "Y" ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO");
             }
             break;
         case "file":
             if (is_array($fieldValue)) {
                 $result = array();
                 foreach ($fieldValue as $r) {
                     $r = intval($r);
                     $dbImg = CFile::GetByID($r);
                     if ($arImg = $dbImg->Fetch()) {
                         $result[] = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $r . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                     }
                 }
             } else {
                 $fieldValue = intval($fieldValue);
                 $dbImg = CFile::GetByID($fieldValue);
                 if ($arImg = $dbImg->Fetch()) {
                     $result = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $fieldValue . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                 }
             }
             break;
         case "select":
             if (isset($arFieldType["Options"][$fieldValue])) {
                 $result = $arFieldType["Options"][$fieldValue];
             }
             break;
     }
     return $result;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:43,代码来源:helper.php

示例8: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "", $popupWindow = null)
 {
     $runtime = CBPRuntime::GetRuntime();
     $documentService = $runtime->GetService("DocumentService");
     $arMap = array("Users" => "requested_users", "OverdueDate" => "requested_overdue_date", "Name" => "requested_name", "Description" => "requested_description", "Parameters" => "requested_parameters", "RequestedInformation" => "requested_information", "TaskButtonMessage" => "task_button_message", "CommentLabelMessage" => "comment_label_message", "ShowComment" => "show_comment", "StatusMessage" => "status_message", "SetStatusMessage" => "set_status_message", 'AccessControl' => 'access_control', "TimeoutDuration" => "timeout_duration", "TimeoutDurationType" => "timeout_duration_type");
     if (!is_array($arWorkflowParameters)) {
         $arWorkflowParameters = array();
     }
     if (!is_array($arWorkflowVariables)) {
         $arWorkflowVariables = array();
     }
     if (!is_array($arCurrentValues)) {
         $arCurrentValues = array();
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         if (is_array($arCurrentActivity["Properties"])) {
             foreach ($arMap as $k => $v) {
                 if (array_key_exists($k, $arCurrentActivity["Properties"])) {
                     if ($k == "Users") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k], $arWorkflowTemplate, $documentType);
                     } else {
                         $arCurrentValues[$arMap[$k]] = $arCurrentActivity["Properties"][$k];
                     }
                 } else {
                     $arCurrentValues[$arMap[$k]] = "";
                 }
             }
         } else {
             foreach ($arMap as $k => $v) {
                 $arCurrentValues[$arMap[$k]] = "";
             }
         }
     }
     $arFieldTypes = $documentService->GetDocumentFieldTypes($documentType);
     $arDocumentFields = $documentService->GetDocumentFields($documentType);
     $ar = array();
     $j = -1;
     if (array_key_exists("requested_information", $arCurrentValues) && is_array($arCurrentValues["requested_information"])) {
         for ($i = 0, $cnt = count($arCurrentValues["requested_information"]) + 1; $i < $cnt; $i++) {
             if (strlen($arCurrentValues["requested_information"][$i]["Name"]) <= 0) {
                 continue;
             }
             $j++;
             $ar[$j] = $arCurrentValues["requested_information"][$i];
             $ar[$j]["Required"] = $ar[$j]["Required"] ? "Y" : "N";
             $ar[$j]["Multiple"] = $ar[$j]["Multiple"] ? "Y" : "N";
         }
     }
     $arCurrentValues["requested_information"] = $ar;
     if (strlen($arCurrentValues['comment_label_message']) <= 0) {
         $arCurrentValues['comment_label_message'] = GetMessage("BPRIA_ACT_COMMENT");
     }
     if (strlen($arCurrentValues['task_button_message']) <= 0) {
         $arCurrentValues['task_button_message'] = GetMessage("BPRIA_ACT_BUTTON1");
     }
     if (strlen($arCurrentValues['status_message']) <= 0) {
         $arCurrentValues['status_message'] = GetMessage("BPRIA_ACT_INFO");
     }
     if (strlen($arCurrentValues["timeout_duration_type"]) <= 0) {
         $arCurrentValues["timeout_duration_type"] = "s";
     }
     $javascriptFunctions = $documentService->GetJSFunctionsForFields($documentType, "objFields", $arDocumentFields, $arFieldTypes);
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "arDocumentFields" => $arDocumentFields, "arFieldTypes" => $arFieldTypes, "javascriptFunctions" => $javascriptFunctions, "formName" => $formName, "popupWindow" => &$popupWindow));
 }
开发者ID:k-kalashnikov,项目名称:geekcon,代码行数:63,代码来源:requestinformationactivity.php

示例9: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $arMap = array("MailUserFrom" => "mail_user_from", "MailCrmEntityToArray" => "mail_crm_entity_to", "MailCrmEntityAddressType" => "mail_crm_entity_address_type", "MailSubject" => "mail_subject", "MailText" => "mail_text", "MailMessageType" => "mail_message_type", "MailCharset" => "mail_charset", "DirrectMail" => "dirrect_mail", "MailSite" => "mail_site");
     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"])) {
                     if ($k == "MailUserFrom") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k . "Array"], $arWorkflowTemplate, $documentType);
                         if (strlen($arCurrentValues[$arMap[$k]]) > 0 && strlen($arCurrentActivity["Properties"][$k]) > 0) {
                             $arCurrentValues[$arMap[$k]] .= ", ";
                         }
                         if (strlen($arCurrentActivity["Properties"][$k]) > 0) {
                             $arCurrentValues[$arMap[$k]] .= $arCurrentActivity["Properties"][$k];
                         }
                     } else {
                         $arCurrentValues[$arMap[$k]] = $arCurrentActivity["Properties"][$k];
                     }
                 } else {
                     $arCurrentValues[$arMap[$k]] = "";
                 }
             }
         } else {
             foreach ($arMap as $k => $v) {
                 $arCurrentValues[$arMap[$k]] = "";
             }
         }
     }
     if ($arCurrentValues['dirrect_mail'] != "Y" && $arCurrentValues['dirrect_mail'] != "N") {
         $arCurrentValues['dirrect_mail'] = "Y";
     }
     global $USER_FIELD_MANAGER;
     $arUserFieldType = $USER_FIELD_MANAGER->GetUserType('crm');
     $mailCrmEntityTo = is_array($arCurrentValues) && isset($arCurrentValues['mail_crm_entity_to']) && is_array($arCurrentValues['mail_crm_entity_to']) ? $arCurrentValues['mail_crm_entity_to'] : array();
     $arCurrentValues['mail_crm_entity_to_text'] = '';
     $entityKeyCount = count($mailCrmEntityTo);
     if ($entityKeyCount > 0 && !CCrmEntityHelper::IsEntityKey($mailCrmEntityTo[$entityKeyCount - 1])) {
         $arCurrentValues['mail_crm_entity_to_text'] = array_pop($mailCrmEntityTo);
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "formName" => $formName, 'crmEntityToUserField' => array('ENTITY_ID' => 'CRM_' . $documentType[2], 'FIELD_NAME' => 'mail_crm_entity_to', 'USER_TYPE_ID' => 'crm', 'SORT' => 100, 'MULTIPLE' => 'Y', 'MANDATORY' => 'Y', 'EDIT_IN_LIST' => 'Y', 'EDIT_FORM_LABEL' => $arUserFieldType['DESCRIPTION'], 'VALUE' => $mailCrmEntityTo, 'USER_TYPE' => $arUserFieldType, 'SETTINGS' => array('LEAD' => 'Y', 'CONTACT' => 'Y', 'COMPANY' => 'Y', 'DEAL' => 'N')), 'crmEntityAddressTypes' => CCrmFieldMulti::GetEntityTypeList('EMAIL', false)));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:49,代码来源:crmemailactivity.php

示例10: GetFieldInputValuePrintable

 function GetFieldInputValuePrintable($documentType, $arFieldType, $fieldValue)
 {
     $result = $fieldValue;
     switch ($arFieldType['Type']) {
         case "user":
             if (!is_array($fieldValue)) {
                 $fieldValue = array($fieldValue);
             }
             $result = CBPHelper::UsersArrayToString($fieldValue, null, array("iblock", "CIBlockDocument", $documentType));
             break;
         case "bool":
             if (is_array($fieldValue)) {
                 $result = array();
                 foreach ($fieldValue as $r) {
                     $result[] = strtoupper($r) != "N" && !empty($r) ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO");
                 }
             } else {
                 $result = strtoupper($fieldValue) != "N" && !empty($fieldValue) ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO");
             }
             break;
         case "file":
             if (is_array($fieldValue)) {
                 $result = array();
                 foreach ($fieldValue as $r) {
                     $r = intval($r);
                     $dbImg = CFile::GetByID($r);
                     if ($arImg = $dbImg->Fetch()) {
                         $result[] = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $r . "&h=" . md5($arImg["SUBDIR"]) . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                     }
                 }
             } else {
                 $fieldValue = intval($fieldValue);
                 $dbImg = CFile::GetByID($fieldValue);
                 if ($arImg = $dbImg->Fetch()) {
                     $result = "[url=/bitrix/tools/bizproc_show_file.php?f=" . htmlspecialcharsbx($arImg["FILE_NAME"]) . "&i=" . $fieldValue . "&h=" . md5($arImg["SUBDIR"]) . "]" . htmlspecialcharsbx($arImg["ORIGINAL_NAME"]) . "[/url]";
                 }
             }
             break;
         case "select":
             if (is_array($arFieldType["Options"])) {
                 if (is_array($fieldValue)) {
                     $result = array();
                     foreach ($fieldValue as $r) {
                         if (array_key_exists($r, $arFieldType["Options"])) {
                             $result[] = $arFieldType["Options"][$r];
                         }
                     }
                 } else {
                     if (array_key_exists($fieldValue, $arFieldType["Options"])) {
                         $result = $arFieldType["Options"][$fieldValue];
                     }
                 }
             }
             break;
     }
     if (strpos($arFieldType['Type'], ":") !== false) {
         if ($arFieldType["Type"] == "S:employee") {
             $fieldValue = CBPHelper::StripUserPrefix($fieldValue);
         }
         $arCustomType = CIBlockProperty::GetUserType(substr($arFieldType['Type'], 2));
         if (array_key_exists("GetPublicViewHTML", $arCustomType)) {
             if (is_array($fieldValue) && !CBPHelper::IsAssociativeArray($fieldValue)) {
                 $result = array();
                 foreach ($fieldValue as $value) {
                     $r = call_user_func_array($arCustomType["GetPublicViewHTML"], array(array("LINK_IBLOCK_ID" => $arFieldType["Options"]), array("VALUE" => $value), ""));
                     $result[] = HTMLToTxt($r);
                 }
             } else {
                 $result = call_user_func_array($arCustomType["GetPublicViewHTML"], array(array("LINK_IBLOCK_ID" => $arFieldType["Options"]), array("VALUE" => $fieldValue), ""));
                 $result = HTMLToTxt($result);
             }
         }
     }
     return $result;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:75,代码来源:iblockdocument.php

示例11: foreach

		</td>
	</tr>
	<?php 
$tabControl->BeginNextTab();
$permissions = $_POST['arWorkflowTemplate'][0]['Properties']['Permission'];
if (!empty($arAllowableOperations)) {
    foreach ($arAllowableOperations as $op_id => $op_name) {
        $parameterKeyExt = 'P' . $op_id;
        ?>
<tr>
	<td valign="top"><?php 
        echo htmlspecialcharsbx($op_name);
        ?>
:</td>
	<td valign="top"><?php 
        $usersP = htmlspecialcharsbx(CBPHelper::UsersArrayToString($permissions[$op_id], $_POST['arWorkflowTemplate'], array(MODULE_ID, ENTITY, $_POST['document_type'])));
        ?>
	<textarea name="<?php 
        echo $parameterKeyExt;
        ?>
" id="id_<?php 
        echo $parameterKeyExt;
        ?>
" rows="4" cols="50"><?php 
        echo $usersP;
        ?>
</textarea>
	<input type="button" value="..." onclick="BPAShowSelector('id_<?php 
        echo $parameterKeyExt;
        ?>
', 'user', 'all', {'arWorkflowParameters': WFSAllData['P'], 'arWorkflowVariables': WFSAllData['V'], 'arWorkflowConstants': WFSAllData['C']});" style="vertical-align: top; margin-left: 2px"/>
开发者ID:k-kalashnikov,项目名称:geekcon,代码行数:31,代码来源:bizproc_wf_settings.php

示例12: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     if (!is_array($arWorkflowParameters)) {
         $arWorkflowParameters = array();
     }
     if (!is_array($arWorkflowVariables)) {
         $arWorkflowVariables = array();
     }
     $documentService = $runtime->GetService("DocumentService");
     if (!is_array($arCurrentValues)) {
         $arCurrentValues = array();
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         if (is_array($arCurrentActivity["Properties"]) && array_key_exists("Fields", $arCurrentActivity["Properties"]) && is_array($arCurrentActivity["Properties"]["Fields"])) {
             foreach ($arCurrentActivity["Properties"]["Fields"] as $k => $v) {
                 $arCurrentValues[$k] = $v;
                 if (in_array($k, array("CREATED_BY", "RESPONSIBLE_ID", "ACCOMPLICES", "AUDITORS"))) {
                     if (!is_array($arCurrentValues[$k])) {
                         $arCurrentValues[$k] = array($arCurrentValues[$k]);
                     }
                     $ar = array();
                     foreach ($arCurrentValues[$k] as $val) {
                         if (intval($val) . "!" == $val . "!") {
                             $val = "user_" . $val;
                         }
                         $ar[] = $val;
                     }
                     $arCurrentValues[$k] = CBPHelper::UsersArrayToString($ar, $arWorkflowTemplate, $documentType);
                 }
                 if ('UF_TASK_WEBDAV_FILES' == $k && is_array($arCurrentValues[$k]) && CModule::IncludeModule("disk") && \Bitrix\Disk\Configuration::isSuccessfullyConverted()) {
                     foreach ($arCurrentValues[$k] as $key => $fileId) {
                         if (!empty($fileId) && is_string($fileId) && substr($fileId, 0, 1) != 'n') {
                             $item = \Bitrix\Disk\Internals\FileTable::getList(array('select' => array('ID'), 'filter' => array('=XML_ID' => $fileId, 'TYPE' => \Bitrix\Disk\Internals\FileTable::TYPE_FILE)))->fetch();
                             if ($item) {
                                 $arCurrentValues[$k][$key] = 'n' . $item['ID'];
                             }
                         }
                     }
                     unset($fileId);
                 }
             }
         }
         $arCurrentValues["HOLD_TO_CLOSE"] = $arCurrentActivity["Properties"]["HoldToClose"] ? "Y" : "N";
         $arCurrentValues["AUTO_LINK_TO_CRM_ENTITY"] = $arCurrentActivity["Properties"]["AUTO_LINK_TO_CRM_ENTITY"] ? "Y" : "N";
     } else {
         foreach (static::$arAllowedTasksFieldNames as $field) {
             if ((!is_array($arCurrentValues[$field]) && strlen($arCurrentValues[$field]) <= 0 || is_array($arCurrentValues[$field]) && count($arCurrentValues[$field]) <= 0) && strlen($arCurrentValues[$field . "_text"]) > 0) {
                 $arCurrentValues[$field] = $arCurrentValues[$field . "_text"];
             }
         }
     }
     $arDocumentFields = self::__GetFields();
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "formName" => $formName, "documentType" => $documentType, "popupWindow" => &$popupWindow, "arDocumentFields" => $arDocumentFields));
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:54,代码来源:task2activity.php

示例13: GetPropertiesDialog

	public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
	{
		$runtime = CBPRuntime::GetRuntime();

		$arMap = array(
			"GroupName" => "group_name",
			"OwnerId" => "owner_id",
			"Users" => 'users'
		);

		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"]))
					{
						if ($k == "OwnerId" || $k == "Users")
							$arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k], $arWorkflowTemplate, $documentType);
						else
							$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,
				"formName" => $formName,
			)
		);
	}
开发者ID:VadimDmitriev,项目名称:Test1,代码行数:46,代码来源:createworkgroup.php

示例14: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $currentParent =& CBPWorkflowTemplateLoader::FindParentActivityByName($arWorkflowTemplate, $activityName);
     $c = count($currentParent['Children']);
     $allowSetStatus = $c == 1 || $currentParent['Children'][$c - 1]["Type"] == 'SetStateActivity';
     if (!is_array($arCurrentValues)) {
         $arCurrentValues = array();
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         if (is_array($arCurrentActivity["Properties"]) && array_key_exists("Permission", $arCurrentActivity["Properties"])) {
             $arCurrentValues["permission"] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"]["Permission"], $arWorkflowTemplate, $documentType);
         }
         if ($c > 1 && $currentParent['Children'][$c - 1]["Type"] == 'SetStateActivity') {
             $arCurrentValues["setstate"] = $currentParent['Children'][$c - 1]["Properties"]["TargetStateName"];
         }
     }
     $arStates = array();
     if ($allowSetStatus) {
         $arStates = CBPWorkflowTemplateLoader::GetStatesOfTemplate($arWorkflowTemplate);
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "formName" => $formName, "allowSetStatus" => $allowSetStatus, "arStates" => $arStates));
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:22,代码来源:handleexternaleventactivity.php

示例15: GetPropertiesDialog

 public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = "")
 {
     $runtime = CBPRuntime::GetRuntime();
     $arMap = array("MailUserFrom" => "mail_user_from", "MailUserTo" => "mail_user_to", "MailSubject" => "mail_subject", "MailText" => "mail_text", "MailMessageType" => "mail_message_type", "MailCharset" => "mail_charset", "DirrectMail" => "dirrect_mail", "MailSite" => "mail_site");
     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"])) {
                     if ($k == "MailUserFrom" || $k == "MailUserTo") {
                         $arCurrentValues[$arMap[$k]] = CBPHelper::UsersArrayToString($arCurrentActivity["Properties"][$k . "Array"], $arWorkflowTemplate, $documentType);
                         if (strlen($arCurrentValues[$arMap[$k]]) > 0 && strlen($arCurrentActivity["Properties"][$k]) > 0) {
                             $arCurrentValues[$arMap[$k]] .= ", ";
                         }
                         if (strlen($arCurrentActivity["Properties"][$k]) > 0) {
                             $arCurrentValues[$arMap[$k]] .= $arCurrentActivity["Properties"][$k];
                         }
                     } else {
                         $arCurrentValues[$arMap[$k]] = $arCurrentActivity["Properties"][$k];
                     }
                 } else {
                     $arCurrentValues[$arMap[$k]] = "";
                 }
             }
         } else {
             foreach ($arMap as $k => $v) {
                 $arCurrentValues[$arMap[$k]] = "";
             }
         }
     }
     if ($arCurrentValues['dirrect_mail'] != "Y" && $arCurrentValues['dirrect_mail'] != "N") {
         $arCurrentValues['dirrect_mail'] = "Y";
     }
     return $runtime->ExecuteResourceFile(__FILE__, "properties_dialog.php", array("arCurrentValues" => $arCurrentValues, "formName" => $formName));
 }
开发者ID:Satariall,项目名称:izurit,代码行数:41,代码来源:mailactivity.php


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