Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
messagelookalikeyandex.php
1<?php
2
4
7
9{
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}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29