- Модуль: rest
- Путь к файлу: ~/bitrix/modules/rest/classes/general/rest_provider.php
- Класс: CRestProvider
- Вызов: CRestProvider::getBitrix24LicenseName
static function getBitrix24LicenseName($licenseType = CBitrix24::LICENSE_TYPE_CURRENT)
{
if (!BitrixMainModuleManager::isModuleInstalled('bitrix24'))
{
return null;
}
$licenseOption = ($licenseType == CBitrix24::LICENSE_TYPE_CURRENT? "~controller_group_name": "~prev_controller_group_name");
$licenseInfo = COption::GetOptionString("main", $licenseOption);
[$lang, $licenseName, $additional] = explode("_", $licenseInfo, 3);
if(!array_key_exists($licenseName, static::$licenseList))
{
$licenseName = static::LICENSE_DEFAULT;
}
if(!$lang)
{
$lang = LANGUAGE_ID;
}
return [
'LANG' => $lang,
'TYPE' => static::$licenseList[$licenseName],
'LICENSE' => $lang."_".static::$licenseList[$licenseName]
];
}