1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
globalconst.php
См. документацию.
1<?php
2
3namespace Bitrix\Bizproc\Workflow\Type;
4
6{
7 const CONF_NAME = 'global_const';
8
9 protected static function getTableEntity(): string
10 {
11 return \Bitrix\Bizproc\Workflow\Type\Entity\GlobalConstTable::class;
12 }
13
14 protected static function getCacheId(): string
15 {
16 return 'constant';
17 }
18
19 public static function getObjectNameForExpressions(): string
20 {
21 return 'GlobalConst';
22 }
23
24 public static function getVisibilityFullNames(array $parameterDocumentType): array
25 {
26 $runtime = \CBPRuntime::GetRuntime();
27 $runtime->StartRuntime();
28 $documentService = $runtime->GetService("DocumentService");
29
30 [$moduleId, $entity, $documentType] = \CBPHelper::ParseDocumentId($parameterDocumentType);
31 $documentCaption = $documentService->getDocumentTypeCaption($parameterDocumentType);
32
33 $names = [];
35 'BIZPROC_LIB_WF_TYPE_GLOBAL_CONST_VISIBILITY_FULL_GLOBAL'
36 );
37
38 switch (mb_strtoupper($moduleId))
39 {
40 case 'CRM':
42 'BIZPROC_LIB_WF_TYPE_GLOBAL_CONST_VISIBILITY_FULL_MODULE',
43 ['#MODULE#' => mb_strtoupper($moduleId)]
44 );
46 'BIZPROC_LIB_WF_TYPE_GLOBAL_CONST_VISIBILITY_FULL_DOCUMENT_SECTION',
47 ['#SECTION#' => $documentCaption]
48 );
49 break;
50 case 'RPA':
52 'BIZPROC_LIB_WF_TYPE_GLOBAL_CONST_VISIBILITY_FULL_MODULE',
53 ['#MODULE#' => mb_strtoupper($moduleId)]
54 );
56 'BIZPROC_LIB_WF_TYPE_GLOBAL_CONST_VISIBILITY_FULL_DOCUMENT_PROCESS',
57 ['#PROCESS#' => $documentCaption]
58 );
59 break;
60 default:
61 $moduleVisibility = '';
62 $documentVisibility = '';
63 }
64
65 if (!$moduleVisibility)
66 {
67 return $names;
68 }
69
70 $names[mb_strtoupper($moduleId)] = $moduleVisibility;
71 $names[mb_strtoupper($moduleId) . '_' . mb_strtoupper($documentType)] = $documentVisibility;
72
73 return $names;
74 }
75
76 public static function saveAll(array $all, int $userId = null)
77 {
78 $diff = array_diff(array_keys(static::getAll()), array_keys($all));
79
80 foreach ($all as $id => $property)
81 {
83 }
84
85 if ($diff)
86 {
87 foreach ($diff as $toDelete)
88 {
90 }
91 }
92
93 //clear cache
94 static::clearStaticCache(self::getCacheId());
95
96 return true;
97 }
98}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static upsertByProperty($constId, array $property, int $userId=null)
Определения globalconst.php:127
static saveAll(array $all, int $userId=null)
Определения globalconst.php:76
static getObjectNameForExpressions()
Определения globalconst.php:19
static getVisibilityFullNames(array $parameterDocumentType)
Определения globalconst.php:24
static getMessage($code, $replace=null, $language=null)
Определения loc.php:30
static delete($primary)
Определения datamanager.php:1644
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$moduleId