1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
notifytemplate.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\Integration\Bizproc\Message;
4
5
class
NotifyTemplate
extends
PlainTemplate
6
{
7
protected
const
DEFAULT_BORDER_COLOR
=
'#468EE5'
;
8
9
protected
string
$entityTypeName
=
''
;
10
protected
string
$entityName
=
''
;
11
protected
string
$entityLink
=
''
;
12
13
public
function
buildMessage
(
array
$messageFields
):
array
14
{
15
$attach = new \CIMMessageParamAttach(0, static::DEFAULT_BORDER_COLOR);
16
17
$attach->SetDescription($this->
buildDescriptionText
());
18
19
$attach->AddDelimiter();
20
$attach->AddMessage(
'[b]'
. $this->entityTypeName .
'[/b][br]'
);
21
$attach->AddLink([
22
'NAME'
=> $this->entityName,
23
'LINK'
=> $this->entityLink,
24
]);
25
$attach->AddDelimiter();
26
$attach->AddMessage($this->
buildMessageText
());
27
28
$messageFields[
'ATTACH'
] = $attach;
29
30
return
$messageFields
;
31
}
32
33
public
function
setFields
(
array
$fields
): self
34
{
35
parent::setFields(
$fields
);
36
37
if
(is_string(
$fields
[
'EntityTypeName'
] ??
null
))
38
{
39
$this->entityTypeName = trim(
$fields
[
'EntityTypeName'
]);
40
}
41
if
(is_string(
$fields
[
'EntityName'
] ??
null
))
42
{
43
$this->entityName = trim(
$fields
[
'EntityName'
]);
44
}
45
if
(is_string(
$fields
[
'EntityLink'
] ??
null
))
46
{
47
$this->entityLink = trim(
$fields
[
'EntityLink'
]);
48
}
49
50
return
$this;
51
}
52
}
$messageFields
$messageFields
Определения
callback_ednaru.php:22
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate
Определения
notifytemplate.php:6
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\DEFAULT_BORDER_COLOR
const DEFAULT_BORDER_COLOR
Определения
notifytemplate.php:7
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\$entityTypeName
string $entityTypeName
Определения
notifytemplate.php:9
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\buildMessage
buildMessage(array $messageFields)
Определения
notifytemplate.php:13
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\$entityLink
string $entityLink
Определения
notifytemplate.php:11
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\$entityName
string $entityName
Определения
notifytemplate.php:10
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate\setFields
setFields(array $fields)
Определения
notifytemplate.php:33
Bitrix\Im\Integration\Bizproc\Message\PlainTemplate
Определения
plaintemplate.php:12
Bitrix\Im\Integration\Bizproc\Message\PlainTemplate\buildMessageText
buildMessageText()
Определения
plaintemplate.php:22
Bitrix\Im\Integration\Bizproc\Message\PlainTemplate\buildDescriptionText
buildDescriptionText()
Определения
plaintemplate.php:34
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
im
lib
integration
bizproc
message
notifytemplate.php
Создано системой
1.14.0