- Модуль: landing
- Путь к файлу: ~/bitrix/modules/landing/lib/node/map.php
- Класс: BitrixLandingNodeMap
- Вызов: Map::saveNode
static function saveNode(BitrixLandingBlock $block, $selector, array $data)
{
$doc = $block->getDom();
$resultList = $doc->querySelectorAll($selector);
foreach ($data as $pos => $value)
{
if (isset($resultList[$pos]) && $value)
{
if (History::isActive())
{
$history = new History($block->getLandingId(), History::ENTITY_TYPE_LANDING);
$history->push('EDIT_MAP', [
'block' => $block,
'selector' => $selector,
'position' => (int)$pos,
'valueBefore' => $resultList[$pos]->getAttributes()[self::ATTR_MAP]->getValue(),
'valueAfter' => $value,
]);
}
$resultList[$pos]->setAttribute(
self::ATTR_MAP,
$value
);
}
}
}