Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
collection.php
1
<?php
2
3
namespace
Bitrix\Im\Integration\Bizproc\Message
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
7
class
Collection
8
{
9
public
const
TEMPLATE_PLAIN
=
'plain'
;
10
public
const
TEMPLATE_NEWS
=
'news'
;
11
public
const
TEMPLATE_NOTIFY
=
'notify'
;
12
public
const
TEMPLATE_IMPORTANT
=
'important'
;
13
public
const
TEMPLATE_ALERT
=
'alert'
;
14
15
public
static
function
getTemplateList
(): array
16
{
17
return
[
18
static::TEMPLATE_PLAIN =>
Loc::getMessage
(
'IM_BIZPROC_MESSAGE_COLLECTION_PlAIN'
),
19
static::TEMPLATE_NEWS =>
Loc::getMessage
(
'IM_BIZPROC_MESSAGE_COLLECTION_NEWS'
),
20
static::TEMPLATE_NOTIFY =>
Loc::getMessage
(
'IM_BIZPROC_MESSAGE_COLLECTION_NOTIFY'
),
21
static::TEMPLATE_IMPORTANT =>
Loc::getMessage
(
'IM_BIZPROC_MESSAGE_COLLECTION_IMPORTANT'
),
22
static::TEMPLATE_ALERT =>
Loc::getMessage
(
'IM_BIZPROC_MESSAGE_COLLECTION_ALERT'
),
23
];
24
}
25
26
public
static
function
makeTemplate
(
string
$type):
Template
27
{
28
return
match ($type)
29
{
30
static::TEMPLATE_NEWS =>
new
NewsTemplate
(),
31
static::TEMPLATE_NOTIFY =>
new
NotifyTemplate
(),
32
static::TEMPLATE_IMPORTANT =>
new
ImportantTemplate
(),
33
static::TEMPLATE_ALERT =>
new
AlertTemplate
(),
34
default
=>
new
PlainTemplate
(),
35
};
36
}
37
}
Bitrix\Im\Integration\Bizproc\Message\AlertTemplate
Definition
alerttemplate.php:6
Bitrix\Im\Integration\Bizproc\Message\Collection
Definition
collection.php:8
Bitrix\Im\Integration\Bizproc\Message\Collection\TEMPLATE_ALERT
const TEMPLATE_ALERT
Definition
collection.php:13
Bitrix\Im\Integration\Bizproc\Message\Collection\TEMPLATE_PLAIN
const TEMPLATE_PLAIN
Definition
collection.php:9
Bitrix\Im\Integration\Bizproc\Message\Collection\TEMPLATE_NOTIFY
const TEMPLATE_NOTIFY
Definition
collection.php:11
Bitrix\Im\Integration\Bizproc\Message\Collection\TEMPLATE_IMPORTANT
const TEMPLATE_IMPORTANT
Definition
collection.php:12
Bitrix\Im\Integration\Bizproc\Message\Collection\makeTemplate
static makeTemplate(string $type)
Definition
collection.php:26
Bitrix\Im\Integration\Bizproc\Message\Collection\TEMPLATE_NEWS
const TEMPLATE_NEWS
Definition
collection.php:10
Bitrix\Im\Integration\Bizproc\Message\Collection\getTemplateList
static getTemplateList()
Definition
collection.php:15
Bitrix\Im\Integration\Bizproc\Message\ImportantTemplate
Definition
importanttemplate.php:6
Bitrix\Im\Integration\Bizproc\Message\NewsTemplate
Definition
newstemplate.php:12
Bitrix\Im\Integration\Bizproc\Message\NotifyTemplate
Definition
notifytemplate.php:6
Bitrix\Im\Integration\Bizproc\Message\PlainTemplate
Definition
plaintemplate.php:12
Bitrix\Im\Integration\Bizproc\Message\Template
Definition
template.php:9
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Im\Integration\Bizproc\Message
Definition
alerttemplate.php:3
modules
im
lib
integration
bizproc
message
collection.php
Создано системой
1.10.0