• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/CustomSection/Manager.php
  • Класс: BitrixIntranetCustomSectionManager
  • Вызов: Manager::prepareComponent
protected function prepareComponent(ResolveResult $result, Uri $url): void
{
	$activePage = $result->getActivePage();
	if (is_null($activePage))
	{
		throw new ObjectNotFoundException('An active page is required for further operations');
	}

	$provider = $this->getProvider($activePage->getModuleId());
	$component = $provider ? $provider->resolveComponent($activePage->getSettings(), $url) : null;

	if (is_null($component))
	{
		$result->addError(new Error(
			Loc::getMessage('INTRANET_CUSTOM_SECTION_MANAGER_COMPONENT_NOT_FOUND'),
			static::ERROR_CODE_COMPONENT_NOT_FOUND
		));
		return;
	}

	$result->setComponentToInclude($component);
}