12 public function execute(
bool $undo =
true): bool
14 $blockId = (int)$this->params[
'block'];
18 && $landing->markDeletedBlock($blockId,
false)
21 foreach ($landing->getBlocks() as $id => $block)
25 $block->setSort($block->getSort() - 1);
30 $landing->resortBlocks();
44 $blockSort = $block->getSort();
45 $code = $block->getCode();
49 foreach ($landing->getBlocks() as $bid => $b)
51 $currentSort = $b->getSort();
52 if ($currentSort >= $previousSort && $currentSort < $blockSort)
54 $previousSort = $currentSort;
60 'block' => $block->getId(),
61 'selector' =>
'#' . Block::getAnchor($block->getId()),
62 'lid' => $block->getLandingId(),
64 'currentBlock' => $previousId,
65 'insertBefore' =>
false,
static enrichParams(array $params)