• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/google/helper.php
  • Класс: BitrixCalendarSyncGoogleHelper
  • Вызов: Helper::getApiKey
public function getApiKey(): ?string
{
	if (
		Loader::includeModule('socialservices')
		&& ($apiKey = Option::get('socialservices', 'google_api_key', null))
	)
	{
		return $apiKey;
	}

	if (Loader::includeModule('fileman'))
	{
		$apiKey = AddressType::getApiKey();
		if (!empty($apiKey))
		{
			return $apiKey;
		}
	}

	return Option::get('fileman', 'google_map_api_key', null)
		?? Option::get('bitrix24', 'google_map_api_key', null)
	;
}