Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
configfactory.php
1
<?php
2
3
namespace
Bitrix\Location\Source\Google
;
4
5
use
Bitrix\Location\Entity\Source\Config
;
6
use
Bitrix\Location\Entity\Source\ConfigItem
;
7
use
Bitrix\Location\Source\IConfigFactory
;
8
9
class
ConfigFactory
implements
IConfigFactory
10
{
11
protected
$frontendKey
;
12
protected
$backendKey
;
13
14
public
function
__construct
(
string
$frontendKey
,
string
$backendKey
)
15
{
16
$this->frontendKey =
$frontendKey
;
17
$this->backendKey =
$backendKey
;
18
}
19
20
public
function
createConfig
():
Config
21
{
22
$sourceConfig =
new
Config
();
23
$sourceConfig->addItem(
24
(
new
ConfigItem
(
'API_KEY_FRONTEND'
,
'string'
))
25
->setSort(10)
26
->setValue($this->frontendKey)
27
)
28
->addItem(
29
(
new
ConfigItem
(
'API_KEY_BACKEND'
,
'string'
))
30
->setSort(20)
31
->setValue($this->backendKey)
32
)
33
->addItem(
34
(
new
ConfigItem
(
'SHOW_PHOTOS_ON_MAP'
,
'bool'
))
35
->setSort(30)
36
->setValue(
false
)
37
)
38
->addItem(
39
(
new
ConfigItem
(
'USE_GEOCODING_SERVICE'
,
'bool'
))
40
->setSort(40)
41
->setValue(
false
)
42
)
43
;
44
45
return
$sourceConfig;
46
}
47
}
Bitrix\Location\Entity\Source\Config
Definition
config.php:11
Bitrix\Location\Entity\Source\ConfigItem
Definition
configitem.php:13
Bitrix\Location\Source\Google\ConfigFactory
Definition
configfactory.php:10
Bitrix\Location\Source\Google\ConfigFactory\$backendKey
$backendKey
Definition
configfactory.php:12
Bitrix\Location\Source\Google\ConfigFactory\createConfig
createConfig()
Definition
configfactory.php:20
Bitrix\Location\Source\Google\ConfigFactory\$frontendKey
$frontendKey
Definition
configfactory.php:11
Bitrix\Location\Source\Google\ConfigFactory\__construct
__construct(string $frontendKey, string $backendKey)
Definition
configfactory.php:14
Bitrix\Location\Source\IConfigFactory
Definition
iconfigfactory.php:8
Bitrix\Location\Source\Google
Definition
configfactory.php:3
Bitrix\Main\Config
Definition
configuration.php:2
modules
location
lib
source
google
configfactory.php
Создано системой
1.10.0