• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Layout/Builder.php
  • Класс: Bitrix\Crm\Service\Timeline\Layout\Builder
  • Вызов: Builder::buildBody
protected function buildBody(): Layout\Body
{
	$body = new Layout\Body();
	$body->setLogo($this->item->getLogo());
	$contentBlocks = array_merge(
		$this->item->getCommonContentBlocksBlocks(),
		$this->item->getContentBlocks() ?? [],
	);
	$currentSort = 0;
	foreach ($contentBlocks as $contentBlock)
	{
		if (is_null($contentBlock->getSort()))
		{
			$contentBlock->setSort($currentSort++);
		}
	}
	$body->setContentBlocks($contentBlocks);

	return $body;
}