• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/landing.php
  • Класс: BitrixLandingLanding
  • Вызов: Landing::resortBlocks
public function resortBlocks()
{
	uasort($this->blocks, function($a, $b)
	{
		if ($a->getSort() == $b->getSort())
		{
			return ($a->getId() < $b->getId()) ? -1 : 1;
		}
		return ($a->getSort() < $b->getSort()) ? -1 : 1;
	});
	$sort = 0;
	foreach ($this->blocks as $id => $block)
	{
		$block->saveSort($sort);
		$sort += 500;
	}
}