1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
sourcecodepicker.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Location\Infrastructure;
4
5
use Bitrix\Location\Entity\Source\Factory;
6
use Bitrix\Main\Config\Option;
7
use Bitrix\Main\Loader;
8
use Bitrix\Main\ModuleManager;
9
15
final
class
SourceCodePicker
16
{
17
private
const
OPTION_NAME =
'location_default_source_code'
;
18
22
public
static
function
getSourceCode
(): string
23
{
24
return
Option::get(
25
'location'
,
26
self::OPTION_NAME,
27
(
28
ModuleManager::isModuleInstalled(
'bitrix24'
)
29
&& Loader::includeModule(
'bitrix24'
)
30
)
31
?
Factory::OSM_SOURCE_CODE
32
:
Factory::GOOGLE_SOURCE_CODE
33
34
);
35
}
36
40
public
static
function
setSourceCode
(
string
$sourceCode): void
41
{
42
Option::set(
'location'
, self::OPTION_NAME, $sourceCode);
43
}
44
}
Bitrix\Location\Entity\Source\Factory\OSM_SOURCE_CODE
const OSM_SOURCE_CODE
Определения
factory.php:18
Bitrix\Location\Entity\Source\Factory\GOOGLE_SOURCE_CODE
const GOOGLE_SOURCE_CODE
Определения
factory.php:17
Bitrix\Location\Infrastructure\SourceCodePicker
Определения
sourcecodepicker.php:16
Bitrix\Location\Infrastructure\SourceCodePicker\setSourceCode
static setSourceCode(string $sourceCode)
Определения
sourcecodepicker.php:40
Bitrix\Location\Infrastructure\SourceCodePicker\getSourceCode
static getSourceCode()
Определения
sourcecodepicker.php:22
bitrix
modules
location
lib
infrastructure
sourcecodepicker.php
Создано системой
1.14.0