1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
MultiplyAction.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Landing\History\Action;
4
5
use Bitrix\Landing\Block;
6
use Bitrix\Landing\History\ActionFactory;
7
use Bitrix\Landing\Node;
8
use Bitrix\Main\Web\Json;
9
10
class
MultiplyAction
extends
BaseAction
11
{
12
protected
const
JS_COMMAND
=
'multiply'
;
13
14
public
function
execute
(
bool
$undo =
true
): bool
15
{
16
foreach
($this->params as $param)
17
{
18
if
(is_array($param) && $param[
'ACTION'
] && $param[
'ACTION_PARAMS'
])
19
{
20
$action
=
ActionFactory::getAction
($param[
'ACTION'
], $undo);
21
if
(
$action
)
22
{
23
$action
->setParams($param[
'ACTION_PARAMS'
],
true
);
24
$action
->execute($undo);
25
}
26
}
27
}
28
29
return
true
;
30
}
31
32
public
static
function
enrichParams
(
array
$params
):
array
33
{
34
return
$params
;
35
}
36
41
public
function
getJsCommand
(
bool
$undo =
true
):
array
42
{
43
$command = parent::getJsCommand($undo);
44
$command[
'params'
] = [];
45
46
foreach
($this->params as $param)
47
{
48
if
(is_array($param) && $param[
'ACTION'
] && $param[
'ACTION_PARAMS'
])
49
{
50
$action
=
ActionFactory::getAction
($param[
'ACTION'
], $undo);
51
if
(
$action
)
52
{
53
$action
->setParams($param[
'ACTION_PARAMS'
],
true
);
54
$command[
'params'
][] =
$action
->getJsCommand($undo);
55
}
56
}
57
}
58
59
return
$command;
60
}
61
}
Bitrix\Landing\History\Action\BaseAction
Определения
BaseAction.php:5
Bitrix\Landing\History\Action\BaseAction\$params
array $params
Определения
BaseAction.php:7
Bitrix\Landing\History\Action\MultiplyAction
Определения
MultiplyAction.php:11
Bitrix\Landing\History\Action\MultiplyAction\getJsCommand
getJsCommand(bool $undo=true)
Определения
MultiplyAction.php:41
Bitrix\Landing\History\Action\MultiplyAction\enrichParams
static enrichParams(array $params)
Определения
MultiplyAction.php:32
Bitrix\Landing\History\Action\MultiplyAction\execute
execute(bool $undo=true)
Определения
MultiplyAction.php:14
Bitrix\Landing\History\Action\MultiplyAction\JS_COMMAND
const JS_COMMAND
Определения
MultiplyAction.php:12
Bitrix\Landing\History\ActionFactory\getAction
static getAction(string $actionName, ?bool $undo=false)
Определения
ActionFactory.php:134
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$action
$action
Определения
file_dialog.php:21
bitrix
modules
landing
lib
History
Action
MultiplyAction.php
Создано системой
1.14.0