• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/configuration/manifest.php
  • Класс: BitrixRestConfigurationManifest
  • Вызов: Manifest::isEntityAvailable
static function isEntityAvailable(string $entityCode, array $option, $uses = []): bool
{
	$manifest = [];
	if (!empty($option['IMPORT_MANIFEST']['USES']))
	{
		$manifest = $option['IMPORT_MANIFEST'];
	}
	elseif (!empty($option['MANIFEST']['USES']))
	{
		$manifest = $option['MANIFEST'];
	}

	if (empty($manifest['USES']))
	{
		return false;
	}

	$access = array_intersect($manifest['USES'], $uses);
	if (!$access)
	{
		return false;
	}

	return true;
}