1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
AbstractCollabLogEntry.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Collab\Log
;
4
5
use
Bitrix\Main\Type\Contract\Arrayable
;
6
use
Bitrix\Main\Type\DateTime
;
7
use
Bitrix\Socialnetwork\Collab\Entity\CollabEntity
;
8
9
abstract
class
AbstractCollabLogEntry
implements
Arrayable
10
{
11
protected
?
int
$id
;
12
protected
int
$userId
;
13
protected
int
$collabId
;
14
protected
DateTime
$dateTime
;
15
protected
?
CollabEntity
$collabEntity
=
null
;
16
private
array
$data = [];
17
18
abstract
static
public
function
getEventType
(): string;
19
20
final
public
function
__construct
(
21
int
$userId
,
22
int
$collabId
,
23
?
CollabEntity
$collabEntity
=
null
,
24
?
int
$id
=
null
,
25
?
DateTime
$dateTime
=
null
,
26
)
27
{
28
$this->
id
= $id;
29
$this->userId =
$userId
;
30
$this->collabId =
$collabId
;
31
$this->collabEntity =
$collabEntity
;
32
$this->dateTime =
$dateTime
??
new
DateTime
();
33
}
34
35
public
function
getId
(): ?int
36
{
37
return
$this->id
;
38
}
39
40
public
function
setUserId
(
int
$userId
): static
41
{
42
$this->userId =
$userId
;
43
44
return
$this;
45
}
46
47
public
function
getUserId
(): int
48
{
49
return
$this->userId
;
50
}
51
52
public
function
setDateTime
(
DateTime
$dateTime
): static
53
{
54
$this->dateTime =
$dateTime
;
55
56
return
$this;
57
}
58
59
public
function
getDateTime
():
DateTime
60
{
61
return
$this->dateTime
;
62
}
63
64
public
function
setEntity
(?
CollabEntity
$entity
): static
65
{
66
$this->collabEntity =
$entity
;
67
68
return
$this;
69
}
70
71
public
function
getEntity
(): ?
CollabEntity
72
{
73
return
$this->collabEntity
;
74
}
75
76
public
function
setData
(
array
$data): static
77
{
78
$this->data = $data;
79
80
return
$this;
81
}
82
83
public
function
getData
():
array
84
{
85
return
$this->data
;
86
}
87
88
public
function
getCollabId
(): int
89
{
90
return
$this->collabId
;
91
}
92
93
public
function
setCollabId
(
int
$collabId
): static
94
{
95
$this->collabId =
$collabId
;
96
97
return
$this;
98
}
99
100
protected
function
setDataValue
(
string
$key
, mixed $value): static
101
{
102
$this->data[
$key
] = $value;
103
104
return
$this;
105
}
106
107
protected
function
getDataValue
(
string
$key
): mixed
108
{
109
return
$this->data[
$key
] ??
null
;
110
}
111
112
public
function
toArray
():
array
113
{
114
$result
= [
115
'USER_ID'
=> $this->
getUserId
(),
116
'COLLAB_ID'
=> $this->
getCollabId
(),
117
'TYPE'
=> $this->
getEventType
(),
118
'ENTITY_TYPE'
=> $this->
getEntity
()?->getType()->value,
119
'ENTITY_ID'
=> $this->
getEntity
()?->getId(),
120
'DATETIME'
=> $this->
getDateTime
(),
121
'DATA'
=> $this->
getData
(),
122
];
123
124
if
($this->
getId
() > 0)
125
{
126
$result
[
'ID'
] = $this->
getId
();
127
}
128
129
return
$result
;
130
}
131
}
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
Bitrix\Socialnetwork\Collab\Entity\CollabEntity
Определения
CollabEntity.php:16
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry
Определения
AbstractCollabLogEntry.php:10
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getUserId
getUserId()
Определения
AbstractCollabLogEntry.php:47
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getEntity
getEntity()
Определения
AbstractCollabLogEntry.php:71
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getId
getId()
Определения
AbstractCollabLogEntry.php:35
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getCollabId
getCollabId()
Определения
AbstractCollabLogEntry.php:88
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\$id
int $id
Определения
AbstractCollabLogEntry.php:11
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setEntity
setEntity(?CollabEntity $entity)
Определения
AbstractCollabLogEntry.php:64
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setDataValue
setDataValue(string $key, mixed $value)
Определения
AbstractCollabLogEntry.php:100
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\toArray
toArray()
Определения
AbstractCollabLogEntry.php:112
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setDateTime
setDateTime(DateTime $dateTime)
Определения
AbstractCollabLogEntry.php:52
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\$collabEntity
CollabEntity $collabEntity
Определения
AbstractCollabLogEntry.php:15
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\$userId
int $userId
Определения
AbstractCollabLogEntry.php:12
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getDataValue
getDataValue(string $key)
Определения
AbstractCollabLogEntry.php:107
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getDateTime
getDateTime()
Определения
AbstractCollabLogEntry.php:59
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getData
getData()
Определения
AbstractCollabLogEntry.php:83
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setData
setData(array $data)
Определения
AbstractCollabLogEntry.php:76
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\getEventType
static getEventType()
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setCollabId
setCollabId(int $collabId)
Определения
AbstractCollabLogEntry.php:93
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\__construct
__construct(int $userId, int $collabId, ?CollabEntity $collabEntity=null, ?int $id=null, ?DateTime $dateTime=null,)
Определения
AbstractCollabLogEntry.php:20
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\setUserId
setUserId(int $userId)
Определения
AbstractCollabLogEntry.php:40
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\$collabId
int $collabId
Определения
AbstractCollabLogEntry.php:13
Bitrix\Socialnetwork\Collab\Log\AbstractCollabLogEntry\$dateTime
DateTime $dateTime
Определения
AbstractCollabLogEntry.php:14
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
Bitrix\Main\Type\Contract\Arrayable
Определения
arrayable.php:6
Bitrix\Socialnetwork\Collab\Log
Определения
AbstractCollabLogEntry.php:3
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
bitrix
modules
socialnetwork
lib
Collab
Log
AbstractCollabLogEntry.php
Создано системой
1.14.0