1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
spaceeventpreprocessor.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Internals\EventService\Processors
;
4
5
use
Bitrix\Socialnetwork\Internals\EventService\Event
;
6
use
Bitrix\Socialnetwork\Internals\EventService\EventCollection
;
7
use
Bitrix\Socialnetwork\Internals\EventService\EventDictionary
;
8
use
Bitrix\Socialnetwork\Space\List\RecentActivity\Event\Service
;
9
use
Bitrix\Socialnetwork\Space\List\RecentActivity\Option\EventPreProcessingOption
;
10
11
class
SpaceEventPreProcessor
12
{
13
private
const
SUPPORTED_EVENTS = [
14
EventDictionary::EVENT_SPACE_LIVEFEED_POST_UPD
,
15
EventDictionary::EVENT_SPACE_TASK_UPDATE
,
16
EventDictionary::EVENT_SPACE_CALENDAR_EVENT_UPD
,
17
];
18
24
public
function
process
(): void
25
{
26
// TODO spaces stub
27
return
;
28
29
if
(!
EventPreProcessingOption::isEnabled
())
30
{
31
return
;
32
}
33
34
$recentActivityService =
new
Service
();
35
foreach
(
EventCollection::getInstance
()->list() as
$event
)
36
{
37
/* @var Event $event */
38
if
(!in_array(
$event
->getType(), self::SUPPORTED_EVENTS,
true
))
39
{
40
continue
;
41
}
42
43
$recentActivityService->preProcessEvent(
$event
);
44
}
45
}
46
}
Bitrix\Socialnetwork\Internals\EventService\EventCollection
Определения
eventcollection.php:13
Bitrix\Socialnetwork\Internals\EventService\EventCollection\getInstance
static getInstance()
Определения
eventcollection.php:30
Bitrix\Socialnetwork\Internals\EventService\EventDictionary
Определения
eventdictionary.php:13
Bitrix\Socialnetwork\Internals\EventService\EventDictionary\EVENT_SPACE_TASK_UPDATE
const EVENT_SPACE_TASK_UPDATE
Определения
eventdictionary.php:32
Bitrix\Socialnetwork\Internals\EventService\EventDictionary\EVENT_SPACE_CALENDAR_EVENT_UPD
const EVENT_SPACE_CALENDAR_EVENT_UPD
Определения
eventdictionary.php:41
Bitrix\Socialnetwork\Internals\EventService\EventDictionary\EVENT_SPACE_LIVEFEED_POST_UPD
const EVENT_SPACE_LIVEFEED_POST_UPD
Определения
eventdictionary.php:50
Bitrix\Socialnetwork\Internals\EventService\Processors\SpaceEventPreProcessor
Определения
spaceeventpreprocessor.php:12
Bitrix\Socialnetwork\Internals\EventService\Processors\SpaceEventPreProcessor\process
process()
Определения
spaceeventpreprocessor.php:24
Bitrix\Socialnetwork\Space\List\RecentActivity\Event\Service
Определения
Service.php:11
Bitrix\Socialnetwork\Space\List\RecentActivity\Option\EventPreProcessingOption
Определения
EventPreProcessingOption.php:8
Bitrix\Socialnetwork\Space\List\RecentActivity\Option\EventPreProcessingOption\isEnabled
static isEnabled()
Определения
EventPreProcessingOption.php:17
Bitrix\Main\Engine\ActionFilter\Service
Определения
token.php:3
Bitrix\Socialnetwork\Internals\EventService\Event
Определения
factory.php:3
Bitrix\Socialnetwork\Internals\EventService\Processors
Определения
spaceeventpreprocessor.php:3
$event
$event
Определения
prolog_after.php:141
bitrix
modules
socialnetwork
lib
internals
eventservice
processors
spaceeventpreprocessor.php
Создано системой
1.14.0