1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
AddCardAction.php
См. документацию.
1<?php
2
3namespace Bitrix\Landing\History\Action;
4
5use Bitrix\Landing\Block;
6use Bitrix\Main\Web\DOM;
7
9{
10 protected const JS_COMMAND = 'addCard';
11
12 public function execute(bool $undo = true): bool
13 {
14 $block = new Block((int)$this->params['block']);
15 $block->cloneCard($this->params['selector'], $this->params['position'] - 1, $this->params['content']);
16
17 return $block->save();
18 }
19
20 public static function enrichParams(array $params): array
21 {
25 $block = $params['block'];
26 $selector = $params['selector'] ?: '';
27 $position = (int)$params['position'] ?: 0;
28 $content = '';
29 if ($selector)
30 {
31 $doc = new DOM\Document();
32 $doc->loadHTML($block->getContent());
33 $resultList = $doc->querySelectorAll($selector);
34 if (isset($resultList[$position]))
35 {
36 $content = $resultList[$position]->getOuterHTML();
37 }
38 }
39
40 return [
41 'block' => $block->getId(),
42 'selector' => $selector,
43 'lid' => $block->getLandingId(),
44 'position' => $position,
45 'content' => $content,
46 ];
47 }
48}
$content
Определения commerceml.php:144
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799