Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
countercontroller.php
1<?php
10
13
15{
16 public static function getValue(string $name = '', int $entityId = 0, int $userId = 0): array
17 {
18 $instance = self::getInstance($name, $entityId, $userId);
19
20 return $instance->getCounterValue();
21 }
22
30 public static function getInstance(string $name = '', int $entityId = 0, int $userId = 0): Provider\Base
31 {
32 switch ($name)
33 {
35 $result = new Provider\WorkgroupRequestsIn([
36 'workgroupId' => $entityId,
37 ]);
38 break;
40 $result = new Provider\WorkgroupRequestsOut([
41 'workgroupId' => $entityId,
42 ]);
43 break;
45 $result = new Provider\WorkgroupListLivefeed([
46 'userId' => $userId,
47 ]);
48 break;
50 $result = new Provider\WorkgroupListTasks([
51 'userId' => $userId,
52 ]);
53 break;
54 default:
55 throw new UnknownCounterException();
56 }
57
58 return $result;
59 }
60}
static getValue(string $name='', int $entityId=0, int $userId=0)
static getInstance(string $name='', int $entityId=0, int $userId=0)