1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
marketingservice.php
См. документацию.
1
<?php
8
9
namespace
Bitrix\Sender\Integration\Seo\Ads
;
10
11
use
Bitrix\Main\Loader
;
12
use
Bitrix\Sender\Integration
;
13
use
Bitrix\Seo\Marketing
;
14
19
class
MarketingService
20
{
26
public
static
function
canUse
()
27
{
28
if
(!Loader::includeModule(
'seo'
))
29
{
30
return
false
;
31
}
32
33
return
Marketing\Configurator::canUse
();
34
}
35
41
public
static
function
isAvailable
()
42
{
43
return
self::canUse
() &&
Integration\Bitrix24\Service::isAdAvailable
();
44
}
45
51
public
static
function
getTypeMap
()
52
{
53
return
[
54
MessageMarketingFb::CODE
=>
Marketing\Service::TYPE_FACEBOOK
55
];
56
}
57
64
public
static
function
getAdsProvider
($adsType,
$clientId
=
null
)
65
{
66
$service
=
Marketing\Configurator::getService
();
67
$service
->setClientId(
$clientId
);
68
$providers =
Marketing\Configurator::getProviders
([$adsType]);
69
$isFound =
false
;
70
$provider
=
array
();
71
foreach
($providers as
$type
=>
$provider
)
72
{
73
if
(
$type
== $adsType)
74
{
75
$isFound =
true
;
76
break
;
77
}
78
}
79
80
if
(!$isFound)
81
{
82
return
null
;
83
}
84
85
return
$provider
;
86
}
87
95
public
static
function
send
(\stdClass
$config
,
array
$contacts)
96
{
97
if
(!static::canUse())
98
{
99
return
false
;
100
}
101
//
102
// $audience = Marketing\Service::getAudience($config->type);
103
// $audience->setAccountId($config->accountId);
104
// $audience->enableQueueMode();
105
106
// if ($config->autoRemoveDayNumber)
107
// {
108
// $audience->enableQueueAutoRemove($config->autoRemoveDayNumber);
109
// }
110
// else
111
// {
112
// $audience->disableQueueAutoRemove();
113
// }
114
//
115
// $audienceImportResult = $audience->addContacts(
116
// $config->audienceId,
117
// $contacts,
118
// array(
119
// 'type' => $config->contactType
120
// )
121
// );
122
//
123
// return $audienceImportResult->isSuccess();
124
return
true
;
125
}
126
}
$type
$type
Определения
options.php:106
$provider
if(!Loader::includeModule('messageservice')) $provider
Определения
callback_ednaruimhpx.php:21
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Sender\Integration\Bitrix24\Service\isAdAvailable
static isAdAvailable()
Определения
service.php:68
Bitrix\Sender\Integration\Seo\Ads\MarketingService
Определения
marketingservice.php:20
Bitrix\Sender\Integration\Seo\Ads\MarketingService\getTypeMap
static getTypeMap()
Определения
marketingservice.php:51
Bitrix\Sender\Integration\Seo\Ads\MarketingService\canUse
static canUse()
Определения
marketingservice.php:26
Bitrix\Sender\Integration\Seo\Ads\MarketingService\send
static send(\stdClass $config, array $contacts)
Определения
marketingservice.php:95
Bitrix\Sender\Integration\Seo\Ads\MarketingService\isAvailable
static isAvailable()
Определения
marketingservice.php:41
Bitrix\Sender\Integration\Seo\Ads\MarketingService\getAdsProvider
static getAdsProvider($adsType, $clientId=null)
Определения
marketingservice.php:64
Bitrix\Sender\Integration\Seo\Ads\MessageMarketingFb\CODE
const CODE
Определения
messagemarketingfb.php:28
Bitrix\Seo\Marketing\Configurator\getService
static getService()
Определения
configurator.php:45
Bitrix\Seo\Marketing\Configurator\getProviders
static getProviders(array $types=null)
Определения
configurator.php:67
Bitrix\Seo\Marketing\Configurator\canUse
static canUse()
Определения
configurator.php:25
Bitrix\Seo\Marketing\Service\TYPE_FACEBOOK
const TYPE_FACEBOOK
Определения
service.php:19
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Sender\Integration\Seo\Ads
Определения
marketingservice.php:9
Bitrix\Sender\Integration
Bitrix\Seo\Marketing
Определения
account.php:3
$service
$service
Определения
payment.php:18
$config
$config
Определения
quickway.php:69
$clientId
$clientId
Определения
seo_client.php:18
bitrix
modules
sender
lib
integration
seo
ads
marketingservice.php
Создано системой
1.14.0