1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SwitcherFactory.php
См. документацию.
1<?php
2
4
9
11{
12 public const SMART_TRACKING = 'smart_tracking';
13 public const PIN = 'pinner';
14 public const FOLLOW = 'follow';
15
16 public static function get(string $type, int $userId, ?int $spaceId, string $code = ''): ?SwitcherInterface
17 {
19 $class = static::getClass($type);
20 if (is_null($class))
21 {
22 return null;
23 }
24
25 return $class::get($userId, $spaceId, empty($code) ? $class::getDefaultCode() : $code);
26 }
27
28 private static function getClass(string $type): ?string
29 {
30 return match ($type)
31 {
32 static::SMART_TRACKING => SmartTracking::class,
33 static::PIN => Pin::class,
34 static::FOLLOW => Follow::class,
35 default => null,
36 };
37 }
38}
$type
Определения options.php:106
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195