• Модуль: salescenter
  • Путь к файлу: ~/bitrix/modules/salescenter/lib/component/paysystem.php
  • Класс: BitrixSalesCenterComponentPaySystem
  • Вызов: PaySystem::getZone
public function getZone(): string
{
	static $zone = null;
	if ($zone !== null)
	{
		return $zone;
	}

	if (MainModuleManager::isModuleInstalled('bitrix24'))
	{
		$zone = CBitrix24::getPortalZone();
		return $zone;
	}

	$iterator = MainLocalizationLanguageTable::getList([
		'select' => ['ID'],
		'filter' => ['=DEF' => 'Y', '=ACTIVE' => 'Y'],
	]);
	$row = $iterator->fetch();
	$zone = $row['ID'];
	if ($zone !== null)
	{
		return $zone;
	}

	if (defined('LANGUAGE_ID'))
	{
		$row = MainLocalizationLanguageTable::getList([
			'select' => ['ID'],
			'filter' => ['=LID' => LANGUAGE_ID],
		])->fetch();
		$zone = $row['ID'];
	}

	return $zone;
}