Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
gridrequest.php
1<?php
2
4
6
11{
13
18 {
19 $this->request = $request;
20 }
21
27 private function getRequestSelectedAllRowsName(): string
28 {
29 return 'action_all_rows_' . $this->getGridId();
30 }
31
32 #region override methods
33
39 final public function getHttpRequest(): HttpRequest
40 {
41 return $this->request;
42 }
43
49 public function getGridId(): ?string
50 {
51 return $this->request->get('grid_id');
52 }
53
59 public function getGridActionId(): ?string
60 {
61 return $this->request->get('grid_action');
62 }
63
69 public function getPanelActionId(): ?string
70 {
71 $actionButtonName = 'action_button_' . $this->getGridId();
72
73 return $this->request->getPost($actionButtonName);
74 }
75
81 public function getRowActionId(): ?string
82 {
83 $actionButtonName = 'action_button_' . $this->getGridId();
84
85 return $this->request->getPost($actionButtonName);
86 }
87
93 public function isSelectedAllPanelRows(): bool
94 {
95 $name = $this->getRequestSelectedAllRowsName();
96
97 return $this->request->getPost($name) === 'Y';
98 }
99
105 public function isSelectedAllPanelGroupRows(): bool
106 {
107 $name = $this->getRequestSelectedAllRowsName();
108 $value = $this->request->getPost('controls')[$name] ?? null;
109
110 return $value === 'Y';
111 }
112
113 #endregion override methods
114}
__construct(HttpRequest $request)