Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
entityselector.php
1<?
2
4
11
13{
14 protected function getDefaultPreFilters()
15 {
16 return [
17 new ActionFilter\Authentication(),
18 new ActionFilter\HttpMethod([ActionFilter\HttpMethod::METHOD_POST]),
19 new ActionFilter\Csrf(),
20 new ActionFilter\CloseSession()
21 ];
22 }
23
24 public function loadAction(JsonPayload $payload)
25 {
26 $request = $payload->getData();
27 $request = is_array($request) ? $request : [];
28
29 $dialog = new Dialog(isset($request['dialog']) && is_array($request['dialog']) ? $request['dialog'] : []);
30 $dialog->load();
31
32 return [
33 'dialog' => $dialog->getAjaxData()
34 ];
35 }
36
37 public function getChildrenAction(JsonPayload $payload)
38 {
39 $request = $payload->getData();
40 $request = is_array($request) ? $request : [];
41
42 $dialog = new Dialog(isset($request['dialog']) && is_array($request['dialog']) ? $request['dialog'] : []);
43
44 $parentItem = new Item(
45 isset($request['parentItem']) && is_array($request['parentItem']) ? $request['parentItem'] : []
46 );
47
48 $dialog->getChildren($parentItem);
49
50 return [
51 'dialog' => $dialog->getAjaxData()
52 ];
53 }
54
55 public function doSearchAction(JsonPayload $payload)
56 {
57 $request = $payload->getData();
58 $request = is_array($request) ? $request : [];
59
60 $dialog = new Dialog(isset($request['dialog']) && is_array($request['dialog']) ? $request['dialog'] : []);
61 $searchQuery = new SearchQuery(
62 isset($request['searchQuery']) && is_array($request['searchQuery']) ? $request['searchQuery'] : []
63 );
64
65 $dialog->doSearch($searchQuery);
66
67 return [
68 'dialog' => $dialog->getAjaxData(),
69 'searchQuery' => $searchQuery
70 ];
71 }
72
73 public function saveRecentItemsAction(JsonPayload $payload)
74 {
75 if (!$GLOBALS['USER']->isAuthorized())
76 {
77 return;
78 }
79
80 $request = $payload->getData();
81 $request = is_array($request) ? $request : [];
82
83 $dialog = new Dialog(isset($request['dialog']) && is_array($request['dialog']) ? $request['dialog'] : []);
84
85 if (isset($request['recentItems']) && is_array($request['recentItems']))
86 {
87 $dialog->saveRecentItems($request['recentItems']);
88 }
89 }
90}
getChildrenAction(JsonPayload $payload)
saveRecentItemsAction(JsonPayload $payload)
saveRecentItems(array $recentItems)
Definition dialog.php:496
$GLOBALS['____1444769544']
Definition license.php:1