Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
manager.php
1
<?php
2
3
namespace
Bitrix\Forum\Comments\Service
;
4
5
class
Manager
6
{
7
public
const
TYPE_TASK_INFO
= 1;
8
public
const
TYPE_TASK_CREATED
= 2;
9
public
const
TYPE_ENTITY_CREATED
= 3;
10
public
const
TYPE_FORUM_DEFAULT
= 1000;
11
12
public
static
function
getTypesList
(): array
13
{
14
return
[
15
static::TYPE_TASK_INFO,
16
static::TYPE_TASK_CREATED,
17
static::TYPE_ENTITY_CREATED,
18
];
19
}
20
21
final
public
static
function
find
(array $params = [])
22
{
23
$commentType = (isset($params[
'SERVICE_TYPE'
]) ? (int)$params[
'SERVICE_TYPE'
] : 0);
24
25
if
($commentType <= 0)
26
{
27
return
false
;
28
}
29
30
switch
($commentType)
31
{
32
case
static::TYPE_TASK_INFO:
33
$result =
new
TaskInfo
();
34
break
;
35
case
static::TYPE_TASK_CREATED:
36
$result =
new
TaskCreated
();
37
break
;
38
case
static::TYPE_ENTITY_CREATED:
39
$result =
new
EntityCreated
();
40
break
;
41
default
:
42
$result =
false
;
43
}
44
45
return
$result;
46
}
47
}
Bitrix\Forum\Comments\Service\EntityCreated
Definition
entitycreated.php:10
Bitrix\Forum\Comments\Service\Manager
Definition
manager.php:6
Bitrix\Forum\Comments\Service\Manager\TYPE_TASK_INFO
const TYPE_TASK_INFO
Definition
manager.php:7
Bitrix\Forum\Comments\Service\Manager\TYPE_TASK_CREATED
const TYPE_TASK_CREATED
Definition
manager.php:8
Bitrix\Forum\Comments\Service\Manager\getTypesList
static getTypesList()
Definition
manager.php:12
Bitrix\Forum\Comments\Service\Manager\find
static find(array $params=[])
Definition
manager.php:21
Bitrix\Forum\Comments\Service\Manager\TYPE_FORUM_DEFAULT
const TYPE_FORUM_DEFAULT
Definition
manager.php:10
Bitrix\Forum\Comments\Service\Manager\TYPE_ENTITY_CREATED
const TYPE_ENTITY_CREATED
Definition
manager.php:9
Bitrix\Forum\Comments\Service\TaskCreated
Definition
taskcreated.php:10
Bitrix\Forum\Comments\Service\TaskInfo
Definition
taskinfo.php:7
Bitrix\Forum\Comments\Service
Definition
base.php:3
modules
forum
lib
comments
service
manager.php
Создано системой
1.10.0