• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/integration/ai/controller.php
  • Класс: BitrixSocialnetworkIntegrationAIController
  • Вызов: Controller::isAvailable
static function isAvailable(string $category, string $contextId = ''): bool
{
	if (!Loader::includeModule('ai'))
	{
		return false;
	}

	$engine = Engine::getByCategory($category, new Context('socialnetwork', $contextId));
	if (is_null($engine))
	{
		return false;
	}

	return Option::get('socialnetwork', 'ai_base_enabled', 'N') === 'Y';
}