Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
gridrequest.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\UI
;
4
5
use
Bitrix\Main\HttpRequest
;
6
10
class
GridRequest
implements
\Bitrix\Main\Grid\GridRequest
11
{
12
protected
HttpRequest
$request
;
13
17
public
function
__construct
(
HttpRequest
$request
)
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
}
Bitrix\Main\Grid\UI\GridRequest
Definition
gridrequest.php:11
Bitrix\Main\Grid\UI\GridRequest\getGridId
getGridId()
Definition
gridrequest.php:49
Bitrix\Main\Grid\UI\GridRequest\getGridActionId
getGridActionId()
Definition
gridrequest.php:59
Bitrix\Main\Grid\UI\GridRequest\getHttpRequest
getHttpRequest()
Definition
gridrequest.php:39
Bitrix\Main\Grid\UI\GridRequest\isSelectedAllPanelGroupRows
isSelectedAllPanelGroupRows()
Definition
gridrequest.php:105
Bitrix\Main\Grid\UI\GridRequest\getRowActionId
getRowActionId()
Definition
gridrequest.php:81
Bitrix\Main\Grid\UI\GridRequest\__construct
__construct(HttpRequest $request)
Definition
gridrequest.php:17
Bitrix\Main\Grid\UI\GridRequest\isSelectedAllPanelRows
isSelectedAllPanelRows()
Definition
gridrequest.php:93
Bitrix\Main\Grid\UI\GridRequest\getPanelActionId
getPanelActionId()
Definition
gridrequest.php:69
Bitrix\Main\Grid\UI\GridRequest\$request
HttpRequest $request
Definition
gridrequest.php:12
Bitrix\Main\HttpRequest
Definition
httprequest.php:20
Bitrix\Main\Grid\GridRequest
Definition
gridrequest.php:17
Bitrix\Main\Grid\UI
Definition
gridrequest.php:3
modules
main
lib
grid
ui
gridrequest.php
Создано системой
1.10.0