Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
menuaction.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\Row\Action
;
4
5
use
Bitrix\Main\HttpRequest
;
6
use
Bitrix\Main\Result
;
7
13
abstract
class
MenuAction
implements
Action
14
{
20
protected
?
string
$className
;
26
protected
?
string
$title
;
27
31
final
public
static
function
getId
(): ?string
32
{
33
return
null
;
34
}
35
39
final
public
function
processRequest
(
HttpRequest
$request): ?
Result
40
{
41
return
null
;
42
}
43
49
abstract
protected
function
getText
(): string;
50
54
abstract
protected
function
getMenu
(): array;
55
59
public
function
getControl
(array $rawFields): array
60
{
61
$result = [
62
'TEXT'
=> $this->
getText
(),
63
'MENU'
=> [],
64
];
65
66
if
(isset($this->className))
67
{
68
$result[
'ICONCLASS'
] =
$this->className
;
69
}
70
71
if
(isset($this->title))
72
{
73
$result[
'TITLE'
] =
$this->title
;
74
}
75
76
foreach
($this->
getMenu
() as $subAction)
77
{
78
if
($subAction instanceof
Action
)
79
{
80
$control = $subAction->getControl($rawFields);
81
if
(isset($control))
82
{
83
$result[
'MENU'
][] = $control;
84
}
85
}
86
}
87
88
return
$result;
89
}
90
}
Bitrix\Main\Grid\Row\Action\MenuAction
Definition
menuaction.php:14
Bitrix\Main\Grid\Row\Action\MenuAction\$className
string $className
Definition
menuaction.php:20
Bitrix\Main\Grid\Row\Action\MenuAction\getControl
getControl(array $rawFields)
Definition
menuaction.php:59
Bitrix\Main\Grid\Row\Action\MenuAction\$title
string $title
Definition
menuaction.php:26
Bitrix\Main\Grid\Row\Action\MenuAction\getMenu
getMenu()
Bitrix\Main\Grid\Row\Action\MenuAction\getText
getText()
Bitrix\Main\Grid\Row\Action\MenuAction\getId
static getId()
Definition
menuaction.php:31
Bitrix\Main\Grid\Row\Action\MenuAction\processRequest
processRequest(HttpRequest $request)
Definition
menuaction.php:39
Bitrix\Main\HttpRequest
Definition
httprequest.php:20
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result
Definition
result.php:14
Bitrix\Main\Grid\Row\Action\Action
Definition
action.php:12
Bitrix\Main\Grid\Row\Action
Definition
action.php:3
modules
main
lib
grid
row
action
menuaction.php
Создано системой
1.10.0