Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
discussionsfilterspaces.php
1<?php
2
4
6{
7 public function getParamsForPresets(): array
8 {
9 $presets[] = [
10 "ID" => "work",
11 "SORT" => 100,
12 "NAME" => "#WORK#",
13 "FILTER" =>[
14 "EVENT_ID" => [
15 "tasks",
16 "timeman_entry",
17 "report"
18 ]
19 ]
20 ];
21
22 $presets[] = [
23 "ID" => "favorites",
24 "SORT" => 200,
25 "NAME" => "#FAVORITES#",
26 "FILTER" => [
27 "FAVORITES_USER_ID" => "Y"
28 ]
29 ];
30
31 $presets[] = [
32 "ID" => "my",
33 "SORT" => 300,
34 "NAME" => "#MY#",
35 "FILTER" => [
36 "CREATED_BY_ID" => "#CURRENT_USER_ID#"
37 ]
38 ];
39
40 if (IsModuleInstalled("blog"))
41 {
42 $presets[] = [
43 "ID" => "important",
44 "SORT" => 350,
45 "NAME" => "#important#",
46 "FILTER" => [
47 "EXACT_EVENT_ID" => "blog_post_important"
48 ]
49 ];
50 }
51
52 if (
53 IsModuleInstalled("lists")
54 && IsModuleInstalled("bizproc")
55 && IsModuleInstalled("intranet")
56 )
57 {
58 $presets[] = [
59 "ID" => "bizproc",
60 "SORT" => 400,
61 "NAME" => "#BIZPROC#",
62 "FILTER" => [
63 "EXACT_EVENT_ID" => "lists_new_element"
64 ]
65 ];
66 }
67
68 if (IsModuleInstalled("intranet"))
69 {
70 $presets[] = [
71 "ID" => "extranet",
72 "SORT" => 500,
73 "NAME" => "#EXTRANET#",
74 "FILTER" => [
75 "SITE_ID" => "#EXTRANET_SITE_ID#",
76 "!EXACT_EVENT_ID" => [
77 "lists_new_element",
78 "tasks",
79 "timeman_entry",
80 "report",
81 "crm_activity_add"
82 ]
83 ]
84 ];
85 }
86
87 return $presets;
88 }
89}