• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/intranetmanager.php
  • Класс: Bitrix\Crm\Integration\IntranetManager
  • Вызов: IntranetManager::getEntityTypesInCustomSections
static function getEntityTypesInCustomSections(): array
{
	if (is_array(static::$entityTypesInCustomSections))
	{
		return static::$entityTypesInCustomSections;
	}

	static::$entityTypesInCustomSections = [];
	$customSections = static::getCustomSections();
	foreach ($customSections as $customSection)
	{
		foreach ($customSection->getPages() as $page)
		{
			$entityTypeId = static::getEntityTypeIdByPageSettings((string)$page->getSettings());
			if ($entityTypeId > 0)
			{
				static::$entityTypesInCustomSections[] = $entityTypeId;
			}
		}
	}

	static::$entityTypesInCustomSections = array_unique(static::$entityTypesInCustomSections);

	return static::$entityTypesInCustomSections;
}