1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
JobFactory.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Onboarding\Entity;
6
7use Bitrix\Socialnetwork\Collab\Onboarding\Internals\Type;
8use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\CreatedTaskOrMeetingOrFileThreeDays;
9use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\CollaberNotAcceptInvitationOneDay;
10use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\CollaberNotAcceptInvitationTwoDays;
11use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\MembersNotInvitedFiveDays;
12use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\MembersNotInvitedFourDays;
13use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\MembersNotInvitedOneDay;
14use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\MembersNotInvitedTwoDays;
15use Bitrix\Socialnetwork\Collab\Onboarding\Entity\Type\StartChattingOneDay;
16
17final class JobFactory
18{
19 public static function create(int $collabId, int $userId, string $type): ?AbstractJob
20 {
21 return match ($type)
22 {
23 Type::MembersNotInvitedOneDay->value => new MembersNotInvitedOneDay($collabId, $userId),
24 Type::MembersNotInvitedTwoDays->value => new MembersNotInvitedTwoDays($collabId, $userId),
25 Type::MembersNotInvitedFourDays->value => new MembersNotInvitedFourDays($collabId, $userId),
26 Type::MembersNotInvitedFiveDays->value => new MembersNotInvitedFiveDays($collabId, $userId),
27
28 Type::CollaberNotAcceptInvitationOneDay->value => new CollaberNotAcceptInvitationOneDay($collabId, $userId),
29 Type::CollaberNotAcceptInvitationTwoDays->value => new CollaberNotAcceptInvitationTwoDays($collabId, $userId),
30
31 Type::CreatedTaskOrMeetingOrFileThreeDays->value => new CreatedTaskOrMeetingOrFileThreeDays($collabId, $userId),
32 Type::StartChattingOneDay->value => new StartChattingOneDay($collabId, $userId),
33
34 default => null,
35 };
36 }
37}
$type
Определения options.php:106
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static create(int $collabId, int $userId, string $type)
Определения JobFactory.php:19