• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/History/Action/ChangeAnchorAction.php
  • Класс: BitrixLandingHistoryActionChangeAnchorAction
  • Вызов: ChangeAnchorAction::execute
public function execute(bool $undo = true): bool
{
	$value = $undo ? $this->params['valueBefore'] : $this->params['valueAfter'];

	if ($this->params['block'])
	{
		if ($value === '')
		{
			return true;
		}

		$block = new Block((int)$this->params['block']);
		$block->setAnchor($value);

		return $block->save();
	}

	return false;
}