• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/intranetmanager.php
  • Класс: Bitrix\Crm\Integration\IntranetManager
  • Вызов: IntranetManager::fillPages
static function fillPages(array $sections): void
{
	$list = CustomSectionPageTable::getList([
		'filter' => [
			'=MODULE_ID' => 'crm',
		],
		'cache' => [
			// cache is valid for one week
			'ttl' => 3600 * 24 * 7,
		],
	]);

	/** @var array $pageRow */
	while ($pageRow = $list->fetch())
	{
		$page = CustomSection\Assembler::constructCustomSectionPage($pageRow);
		$section = $sections[$page->getCustomSectionId()] ?? null;

		if ($section)
		{
			$currentPages = $section->getPages();

			$currentPages[$page->getId()] = $page;

			$section->setPages($currentPages);
		}
	}
}