Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
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
Definition
factory.php:16
Bitrix\Location\Entity\Source\Factory\OSM_SOURCE_CODE
const OSM_SOURCE_CODE
Definition
factory.php:18
Bitrix\Location\Entity\Source\Factory\GOOGLE_SOURCE_CODE
const GOOGLE_SOURCE_CODE
Definition
factory.php:17
Bitrix\Location\Infrastructure\SourceCodePicker
Definition
sourcecodepicker.php:16
Bitrix\Location\Infrastructure\SourceCodePicker\setSourceCode
static setSourceCode(string $sourceCode)
Definition
sourcecodepicker.php:40
Bitrix\Location\Infrastructure\SourceCodePicker\getSourceCode
static getSourceCode()
Definition
sourcecodepicker.php:22
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Main\ModuleManager
Definition
modulemanager.php:5
Bitrix\Location\Infrastructure
Definition
datainstaller.php:3
modules
location
lib
infrastructure
sourcecodepicker.php
Создано системой
1.10.0