1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
listsocnet.php
См. документацию.
1<?php
2
4
6{
8 {
9 if (CModule::IncludeModule("lists") && !CLists::isFeatureEnabled("lists"))
10 {
11 return;
12 }
13
14 $arSocNetFeaturesSettings["group_lists"] = array(
15 "allowed" => array(SONET_ENTITY_GROUP),
16 "operations" => array(
19 ),
20 "minoperation" => array("view"),
21/*
22waiting for integration lists into events_user_view
23
24 "subscribe_events" => array(
25 "lists" => array(
26 "ENTITIES" => array(
27 SONET_SUBSCRIBE_ENTITY_GROUP => array(
28 "TITLE" => GetMessage("LISTS_SOCNET_LOG_GROUP"),
29 "TITLE_SETTINGS" => GetMessage("LISTS_SOCNET_LOG_GROUP_SETTINGS"),
30 ),
31 ),
32 "OPERATION" => "view",
33 "CLASS_FORMAT" => "CListsSocnet",
34 "METHOD_FORMAT" => "FormatEvent_Lists",
35 "HAS_CB" => "Y"
36 ),
37 "lists_del" => array(
38 "ENTITIES" => array(
39 SONET_SUBSCRIBE_ENTITY_GROUP => array(
40 "TITLE" => GetMessage("LISTS_DEL_SOCNET_LOG_GROUP"),
41 ),
42 ),
43 "OPERATION" => "view",
44 "CLASS_FORMAT" => "CListsSocnet",
45 "METHOD_FORMAT" => "FormatEvent_Lists",
46 "HIDDEN" => true,
47 "HAS_CB" => "Y"
48 )
49 ),
50*/
51 "title" => GetMessage("LISTS_SOCNET_TAB"),
52 "hide_operations_settings" => true,
53 );
54 }
55
56 public static function OnFillSocNetMenu(&$arResult, $arParams = array())
57 {
58 global $USER;
59
60 $arResult["AllowSettings"]["group_lists"] = true;
61
62 $arResult["CanView"]["group_lists"] = ((array_key_exists("ActiveFeatures", $arResult) ? array_key_exists("group_lists", $arResult["ActiveFeatures"]) : true) && CSocNetFeaturesPerms::CanPerformOperation(
63 $USER->GetID(),
64 $arParams["ENTITY_TYPE"],
65 $arParams["ENTITY_ID"], "group_lists", "view",
66 CSocNetUser::IsCurrentUserModuleAdmin()
67 ));
68
69 $arResult["Title"]["group_lists"] = (array_key_exists("ActiveFeatures", $arResult) && array_key_exists("group_lists", $arResult["ActiveFeatures"]) && $arResult["ActiveFeatures"]["group_lists"] <> '' ? $arResult["ActiveFeatures"]["group_lists"] : GetMessage("LISTS_SOCNET_TAB"));
70
71 if (!array_key_exists("SEF_MODE", $arResult) || $arResult["SEF_MODE"] != "N")
72 {
73 if(isset($arResult["Urls"]))
74 $arResult["Urls"]["group_lists"] = ($arResult["Urls"]["view"] ?? '') . "lists/";
75 }
76 else
77 {
78 if (!array_key_exists("PAGE_VAR", $arResult))
79 $arResult["PAGE_VAR"] = "page";
80
81 if (!array_key_exists("GROUP_VAR", $arResult))
82 $arResult["GROUP_VAR"] = "group_id";
83
84 $arResult["Urls"]["group_lists"] = "?".$arResult["PAGE_VAR"]."=group_lists&".$arResult["GROUP_VAR"]."=".$arResult["Group"]["ID"];
85 }
86 }
87
88 public static function OnParseSocNetComponentPath(&$arUrlTemplates, &$arCustomPagesPath, $arParams)
89 {
90 if ($arParams["SEF_MODE"] == "N")
91 {
92 $arMyUrlTemplates = array(
93 "group_lists" => "page=group_lists&group_id=#group_id#",
94 "group_list_view" => "page=group_list_view&group_id=#group_id#&list_id=#list_id#&section_id=#section_id#",
95 "group_list_sections" => "page=group_list_sections&group_id=#group_id#&list_id=#list_id#&section_id=#section_id#",
96 "group_list_edit" => "page=group_list_edit&group_id=#group_id#&list_id=#list_id#",
97 "group_list_fields" => "page=group_list_fields&group_id=#group_id#&list_id=#list_id#",
98 "group_list_field_edit" => "page=group_list_field_edit&group_id=#group_id#&list_id=#list_id#&field_id=#field_id#",
99 "group_list_element_edit" => "page=group_list_element_edit&group_id=#group_id#&list_id=#list_id#&section_id=#section_id#&element_id=#element_id#",
100 "group_list_file" => "page=group_list_file&group_id=#group_id#&list_id=#list_id#&section_id=#section_id#&element_id=#element_id#&field_id=#field_id#&file_id=#file_id#",
101 "group_bizproc_log" => "page=group_bizproc_log&group_id=#group_id#&list_id=#list_id#&document_state_id=#document_state_id#",
102 "group_bizproc_workflow_start" => "page=group_bizproc_workflow_start&group_id=#group_id#&list_id=#list_id#&element_id=#element_id#",
103 "group_bizproc_task" => "page=group_bizproc_task&group_id=#group_id#&list_id=#list_id#&section_id=#section_id#&element_id=#element_id#&task_id=#task_id#",
104 "group_bizproc_workflow_admin" => "page=group_bizproc_workflow_admin&group_id=#group_id#&list_id=#list_id#",
105 "group_bizproc_workflow_edit" => "page=group_bizproc_workflow_admin&group_id=#group_id#&list_id=#list_id#&ID=#ID#",
106 "group_list_export_excel" => "page=group_list_export_excel&group_id=#group_id#&list_id=#list_id#",
107 );
108 }
109 else
110 {
111 $arMyUrlTemplates = array(
112 "group_lists" => "group/#group_id#/lists/",
113 "group_list_view" => "group/#group_id#/lists/#list_id#/view/#section_id#/",
114 "group_list_sections" => "group/#group_id#/lists/#list_id#/edit/#section_id#/",
115 "group_list_edit" => "group/#group_id#/lists/#list_id#/edit/",
116 "group_list_fields" => "group/#group_id#/lists/#list_id#/fields/",
117 "group_list_field_edit" => "group/#group_id#/lists/#list_id#/field/#field_id#/",
118 "group_list_element_edit" => "group/#group_id#/lists/#list_id#/element/#section_id#/#element_id#/",
119 "group_list_file" => "group/#group_id#/lists/#list_id#/file/#section_id#/#element_id#/#field_id#/#file_id#/",
120 "group_bizproc_log" => "group/#group_id#/lists/#list_id#/bp_log/#document_state_id#/",
121 "group_bizproc_workflow_start" => "group/#group_id#/lists/#list_id#/bp_start/#element_id#/",
122 "group_bizproc_task" => "group/#group_id#/lists/#list_id#/bp_task/#section_id#/#element_id#/#task_id#/",
123 "group_bizproc_workflow_admin" => "group/#group_id#/lists/#list_id#/bp_admin/",
124 "group_bizproc_workflow_edit" => "group/#group_id#/lists/#list_id#/bp_edit/#ID#/",
125 "group_list_export_excel" => "group/#group_id#/lists/#list_id#/excel/",
126 );
127 }
128
129 static $base_path = false;
130 if(!$base_path)
131 {
132 if(file_exists($_SERVER["DOCUMENT_ROOT"]."/bitrix/php_interface/lists/".SITE_ID."/group_lists.php"))
133 $base_path = "/bitrix/php_interface/lists/".SITE_ID."/";
134 elseif(file_exists($_SERVER["DOCUMENT_ROOT"]."/bitrix/php_interface/lists/group_lists.php"))
135 $base_path = "/bitrix/php_interface/lists/";
136 else
137 $base_path = "/bitrix/modules/lists/socnet/";
138 }
139
140 foreach($arMyUrlTemplates as $page => $url)
141 {
142 $arUrlTemplates[$page] = $url;
143 $arCustomPagesPath[$page] = $base_path;
144 }
145
147 $arParams['SEF_FOLDER'].$arUrlTemplates['group_list_element_edit'],
148 'lists',
149 '\Bitrix\Lists\Preview\Element',
150 array(
151 'listId' => '$list_id',
152 'sectionId' => '$section_id',
153 'elementId' => '$element_id',
154 'IBLOCK_TYPE_ID' => COption::GetOptionString("lists", "socnet_iblock_type_id")
155 )
156 );
157 }
158
159 public static function OnInitSocNetComponentVariables(&$arVariableAliases, &$arCustomPagesPath)
160 {
161 $arVariableAliases['list_id'] = 'list_id';
162 $arVariableAliases['section_id'] = 'section_id';
163 $arVariableAliases['element_id'] = 'element_id';
164 $arVariableAliases['field_id'] = 'field_id';
165 $arVariableAliases['task_id'] = 'task_id';
166 $arVariableAliases['file_id'] = 'file_id';
167 $arVariableAliases['document_state_id'] = 'document_state_id';
168 $arVariableAliases['mode'] = 'mode';
169 $arVariableAliases['ID'] = 'ID';
170 }
171}
$arParams
Определения access_dialog.php:21
$arResult
Определения generate_coupon.php:16
static setRouteHandler($route, $handlerModule, $handlerClass, array $handlerParameters)
Определения router.php:44
Определения listsocnet.php:6
static OnFillSocNetMenu(&$arResult, $arParams=array())
Определения listsocnet.php:56
static OnParseSocNetComponentPath(&$arUrlTemplates, &$arCustomPagesPath, $arParams)
Определения listsocnet.php:88
static OnInitSocNetComponentVariables(&$arVariableAliases, &$arCustomPagesPath)
Определения listsocnet.php:159
static OnFillSocNetFeaturesList(&$arSocNetFeaturesSettings)
Определения listsocnet.php:7
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$_SERVER["DOCUMENT_ROOT"]
Определения cron_frame.php:9
global $USER
Определения csv_new_run.php:40
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
$page
Определения order_form.php:33
const SONET_ROLES_USER
Определения include.php:31
const SONET_ENTITY_GROUP
Определения include.php:117
const SONET_ROLES_MODERATOR
Определения include.php:30
if( $_SERVER $arSocNetFeaturesSettings['REQUEST_METHOD']=="GET" &&($RestoreDefaults ?? null)<> '' && $SONET_RIGHT=="W" &&check_bitrix_sessid())
Определения options.php:35
const SITE_ID
Определения sonet_set_content_view.php:12
$url
Определения iframe.php:7