Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
event.php
1
<?php
2
3
namespace
Bitrix\Sale\Internals\Analytics\Events
;
4
5
use
Bitrix\Main
;
6
13
final
class
Event
14
{
15
public
const
FACEBOOK_CONVERSION_SHOP_EVENT_ENABLED
=
'FACEBOOK_CONVERSION_SHOP_EVENT_ENABLED'
;
16
public
const
FACEBOOK_CONVERSION_SHOP_EVENT_DISABLED
=
'FACEBOOK_CONVERSION_SHOP_EVENT_DISABLED'
;
17
public
const
FACEBOOK_CONVERSION_EVENT_FIRED
=
'FACEBOOK_CONVERSION_EVENT_FIRED'
;
18
20
private
$name;
21
23
private
$payload = [];
24
28
public
function
__construct
(
string
$name, array $payload)
29
{
30
if
(!in_array($name, self::getAvailableNames(),
true
))
31
{
32
throw
new
Main\ArgumentException
(
33
'Name not available, see \Bitrix\Sale\Internals\Analytics\Events\Event::getAvailableNames'
,
34
'name'
35
);
36
}
37
38
$this->name = $name;
39
$this->payload = $payload;
40
}
41
45
public
function
getName
(): string
46
{
47
return
$this->name;
48
}
49
53
public
function
getPayload
(): array
54
{
55
return
$this->payload;
56
}
57
61
private
static
function
getAvailableNames(): array
62
{
63
return
[
64
self::FACEBOOK_CONVERSION_SHOP_EVENT_ENABLED,
65
self::FACEBOOK_CONVERSION_SHOP_EVENT_DISABLED,
66
self::FACEBOOK_CONVERSION_EVENT_FIRED,
67
];
68
}
69
}
Bitrix\Catalog\Model\Event
Definition
event.php:11
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\Sale\Internals\Analytics\Events\Event\FACEBOOK_CONVERSION_EVENT_FIRED
const FACEBOOK_CONVERSION_EVENT_FIRED
Definition
event.php:17
Bitrix\Sale\Internals\Analytics\Events\Event\getName
getName()
Definition
event.php:45
Bitrix\Sale\Internals\Analytics\Events\Event\FACEBOOK_CONVERSION_SHOP_EVENT_ENABLED
const FACEBOOK_CONVERSION_SHOP_EVENT_ENABLED
Definition
event.php:15
Bitrix\Sale\Internals\Analytics\Events\Event\getPayload
getPayload()
Definition
event.php:53
Bitrix\Sale\Internals\Analytics\Events\Event\FACEBOOK_CONVERSION_SHOP_EVENT_DISABLED
const FACEBOOK_CONVERSION_SHOP_EVENT_DISABLED
Definition
event.php:16
Bitrix\Sale\Internals\Analytics\Events\Event\__construct
__construct(string $name, array $payload)
Definition
event.php:28
Bitrix\Main
Bitrix\Sale\Internals\Analytics\Events
Definition
event.php:3
modules
sale
lib
internals
analytics
events
event.php
Создано системой
1.10.0