Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
2
4
7
8class Factory
9{
10 public static function buildEvent(string $hitId, string $type, array $data = [], int|null $eventId = null): Event
11 {
12 switch ($type)
13 {
18 $event = new WorkgroupEvent($hitId, $type);
19 break;
20 default:
21 $event = new Event($hitId, $type);
22 }
23
24 $event->setData($data);
25
26 if ($eventId)
27 {
28 $event->setId($eventId);
29 }
30
31 return $event;
32 }
33}
static buildEvent(string $hitId, string $type, array $data=[], int|null $eventId=null)
Definition factory.php:10