1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
actions.php
См. документацию.
1<?
2
4
7
8class Actions
9{
10 const GET_DATA = "getData";
11 const GET_DEPARTMENT_DATA = "getDepartmentData";
12 const GET_TREE_ITEM_DATA = "getTreeItemRelation";
13 const SEARCH = "search";
14
15 public static function getList()
16 {
17 $reflection = new \ReflectionClass(__CLASS__);
18 return $reflection->getConstants();
19 }
20
21 public static function processAjax($action = false, $options = array(), $requestFields = array())
22 {
23 $result = array();
24 if (isset($requestFields['LD_SEARCH']) && $requestFields['LD_SEARCH'] == 'Y')
25 {
26 $action = self::SEARCH;
27 }
28 elseif (isset($requestFields['LD_DEPARTMENT_RELATION']) && $requestFields['LD_DEPARTMENT_RELATION'] == 'Y')
29 {
30 $action = self::GET_DEPARTMENT_DATA;
31 }
32
33 if (!in_array($action, self::getList()))
34 {
35 return $result;
36 }
37
38 $event = new Event("main", "OnUISelectorActionProcessAjax", array(
39 'action' => $action,
40 'options' => $options,
41 'requestFields' => $requestFields
42 ));
43 $event->send();
44 $eventResultList = $event->getResults();
45
46 if (is_array($eventResultList) && !empty($eventResultList))
47 {
48 foreach ($eventResultList as $eventResult)
49 {
50 if ($eventResult->getType() == EventResult::SUCCESS)
51 {
52 $resultParams = $eventResult->getParameters();
53 $result = $resultParams['result'];
54 break;
55 }
56 }
57 }
58
59 return $result;
60 }
61}
Определения event.php:5
static processAjax($action=false, $options=array(), $requestFields=array())
Определения actions.php:21
const GET_TREE_ITEM_DATA
Определения actions.php:12
const GET_DATA
Определения actions.php:10
const SEARCH
Определения actions.php:13
const GET_DEPARTMENT_DATA
Определения actions.php:11
static getList()
Определения actions.php:15
$options
Определения commerceml2.php:49
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$event
Определения prolog_after.php:141
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
$action
Определения file_dialog.php:21