Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
messagelookalikeyandex.php
1
<?php
2
3
namespace
Bitrix\Sender\Integration\Seo\Ads
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Main\Result
;
7
8
class
MessageLookalikeYandex
extends
MessageLookalike
9
{
10
public
const
CODE
=
self::CODE_ADS_LOOKALIKE_YANDEX
;
11
17
public
function
getName
(): string
18
{
19
return
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_NAME_ADS_LOOKALIKE_YA'
);
20
}
21
25
protected
function
setConfigurationOptions
()
26
{
27
$this->configuration->setArrayOptions([
28
[
29
'type'
=>
'title'
,
30
'code'
=>
'AUDIENCE_NAME'
,
31
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_AUDIENCE_TITLE'
),
32
'required'
=>
true
,
33
],
34
[
35
'type'
=>
'string'
,
36
'code'
=>
'AUDIENCE_LOOKALIKE'
,
37
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_ACCOUNT_ID'
),
38
'required'
=>
true
,
39
],
40
[
41
'type'
=>
'string'
,
42
'code'
=>
'CLIENT_ID'
,
43
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_CLIENT_ID'
),
44
'required'
=>
true
,
45
],
46
[
47
'type'
=>
'string'
,
48
'code'
=>
'ACCOUNT_ID'
,
49
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_ACCOUNT_ID'
),
50
'required'
=>
false
,
51
],
52
[
53
'type'
=>
'string'
,
54
'code'
=>
'AUDIENCE_ID'
,
55
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_AUDIENCE_ID'
),
56
'required'
=>
true
,
57
],
58
[
59
'type'
=>
'bool'
,
60
'code'
=>
'DEVICE_DISTRIBUTION'
,
61
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_DEVICE_DISTRIBUTION'
),
62
'required'
=>
false
,
63
],
64
[
65
'type'
=>
'bool'
,
66
'code'
=>
'GEO_DISTRIBUTION'
,
67
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_SEO_MESSAGE_CONFIG_GEO_DISTRIBUTION'
),
68
'required'
=>
false
,
69
],
70
]);
71
}
72
76
public
function
onBeforeStart
(): \
Bitrix
\Main\
Result
77
{
78
return
new
Result
();
79
}
80
84
public
function
getLookalikeOptions
(): array
85
{
86
return
[
87
'name'
=> $this->configuration->get(
'AUDIENCE_NAME'
),
88
'lookalike_value'
=> $this->configuration->get(
'AUDIENCE_LOOKALIKE'
),
89
'maintain_device_distribution'
=> $this->configuration->get(
'DEVICE_DISTRIBUTION'
),
90
'maintain_geo_distribution'
=> $this->configuration->get(
'GEO_DISTRIBUTION'
),
91
];
92
}
93
}
Bitrix\Main\DB\Result
Definition
result.php:19
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Sender\Integration\Seo\Ads\MessageBase\CODE_ADS_LOOKALIKE_YANDEX
const CODE_ADS_LOOKALIKE_YANDEX
Definition
messagebase.php:34
Bitrix\Sender\Integration\Seo\Ads\MessageLookalike
Definition
messagelookalike.php:25
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex
Definition
messagelookalikeyandex.php:9
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex\CODE
const CODE
Definition
messagelookalikeyandex.php:10
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex\getLookalikeOptions
getLookalikeOptions()
Definition
messagelookalikeyandex.php:84
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex\setConfigurationOptions
setConfigurationOptions()
Definition
messagelookalikeyandex.php:25
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex\onBeforeStart
onBeforeStart()
Definition
messagelookalikeyandex.php:76
Bitrix\Sender\Integration\Seo\Ads\MessageLookalikeYandex\getName
getName()
Definition
messagelookalikeyandex.php:17
Bitrix\Sender\Integration\Seo\Ads
Definition
marketingservice.php:9
Bitrix
modules
sender
lib
integration
seo
ads
messagelookalikeyandex.php
Создано системой
1.10.0