3namespace Bitrix\Landing\PublicAction;
6use Bitrix\Landing\PublicActionResult;
7use Bitrix\Landing\Template;
8use Bitrix\Landing\TemplateRef;
22 'stack' => $historyMain->getJsStack(),
23 'step' => $historyMain->getStep(),
30 $landing = Landing\Landing::createInstance($lid);
36 'ID' => $landing->getTplId()
41 foreach ($landing->getAreas() as $areaLid)
51 $histories[$areaLid] = [
52 'stack' => $historyArea->getJsStack(),
53 'step' => $historyArea->getStep(),
63 foreach ($histories as $history)
65 foreach ($history[
'stack'] as $item)
69 if ($item[
'id'] > $maxStepId)
71 $maxStepId = $item[
'id'];
80 foreach ($histories as $history)
82 foreach ($history[
'stack'] as $item)
84 $multiAreaStack[$item[
'id']] = $item;
87 if ($item[
'id'] <= $maxStepId)
93 ksort($multiAreaStack);
96 'stack' => array_values($multiAreaStack),
97 'step' => $multiAreaStep,
104 $result->setResult($histories[$lid]);
116 'stack' => $history->getJsStack(),
117 'step' => $history->getStep(),
125 return self::undoForEntity(
Landing\History::ENTITY_TYPE_LANDING, $lid);
130 return self::redoForEntity(
Landing\History::ENTITY_TYPE_LANDING, $lid);
135 return self::undoForEntity(
Landing\History::ENTITY_TYPE_DESIGNER_BLOCK, $blockId);
140 return self::redoForEntity(
Landing\History::ENTITY_TYPE_DESIGNER_BLOCK, $blockId);
145 return self::pushForEntity(
Landing\History::ENTITY_TYPE_DESIGNER_BLOCK, $blockId,
$action,
$data);
150 return self::clearForEntity(
Landing\History::ENTITY_TYPE_DESIGNER_BLOCK, $blockId);
155 return self::clearFutureForEntity(
Landing\History::ENTITY_TYPE_LANDING, $landingId);
161 $error = new \Bitrix\Landing\Error;
163 Landing\Landing::setEditMode(
true);
165 if (in_array($entityType,
Landing\History::AVAILABLE_TYPES))
168 $command = $history->getJsCommand();
169 if ($history->undo())
176 'HISTORY_UNDO_ERROR',
177 "History operation Undo fail for entity {$entityType}_{$entityId}"
185 'HISTORY_WRONG_TYPE',
186 'Wrong history entity type'
197 $error = new \Bitrix\Landing\Error;
199 Landing\Landing::setEditMode(
true);
201 if (in_array($entityType,
Landing\History::AVAILABLE_TYPES))
204 $command = $history->getJsCommand(
false);
205 if ($history->redo())
212 'HISTORY_REDO_ERROR',
213 "History operation Redo fail for entity {$entityType}_{$entityId}"
221 'HISTORY_WRONG_TYPE',
222 'Wrong history entity type'
238 $error = new \Bitrix\Landing\Error;
240 Landing\Landing::setEditMode(
true);
242 if (in_array($entityType,
Landing\History::AVAILABLE_TYPES))
252 'HISTORY_PUSH_ERROR',
253 "History operation Push fail for entity {$entityType}_{$entityId}"
261 'HISTORY_WRONG_TYPE',
262 'Wrong history entity type'
273 $error = new \Bitrix\Landing\Error;
275 Landing\Landing::setEditMode(
true);
277 if (in_array($entityType,
Landing\History::AVAILABLE_TYPES))
280 if ($history->clear())
287 'HISTORY_CLEAR_ERROR',
288 "History operation Clear fail for entity {$entityType}_{$entityId}"
296 'HISTORY_WRONG_TYPE',
297 'Wrong history entity type'
308 $error = new \Bitrix\Landing\Error;
310 Landing\Landing::setEditMode(
true);
312 if (in_array($entityType,
Landing\History::AVAILABLE_TYPES))
315 if ($history->clearFuture())
322 'HISTORY_CLEAR_FUTURE_ERROR',
323 "History operation Clear future fail for entity {$entityType}_{$entityId}"
331 'HISTORY_WRONG_TYPE',
332 'Wrong history entity type'
static redoLanding(int $lid)
static redoForEntity(string $entityType, int $entityId)
static clearFutureForEntity(string $entityType, int $entityId)
static pushForEntity(string $entityType, int $entityId, string $action, array $data)
static undoDesignerBlock(int $blockId)
static redoDesignerBlock(int $blockId)
static getForDesignerBlock(int $blockId)
static clearDesignerBlock(int $blockId)
static undoLanding(int $lid)
static getForLanding(int $lid)
static clearForEntity(string $entityType, int $entityId)
static pushDesignerBlock(int $blockId, string $action, array $data)
static undoForEntity(string $entityType, int $entityId)
static clearFutureForLanding(int $landingId)
static getList(array $params=array())
static landingIsArea(int|array $lid)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"