Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
RemoveNodeAction.php
1<?php
2
4
6{
7 protected const JS_COMMAND = 'removeNode';
8
9 public function execute(bool $undo = true): bool
10 {
11 return true;
12 }
13
14 public static function enrichParams(array $params): array
15 {
16 return $params;
17 }
18
23 public function getJsCommand(bool $undo = true): array
24 {
25 $params = parent::getJsCommand($undo);
26
27 $params['params']['value'] =
28 $undo
29 ? $params['params']['valueBefore']
30 : $params['params']['valueAfter']
31 ;
32
33 unset(
34 $params['params']['valueAfter'],
35 $params['params']['valueBefore'],
36 );
37
38 return $params;
39 }
40}