1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
workgrouplisttasks.php
См. документацию.
1<?php
2
9
10namespace Bitrix\Socialnetwork\Internals\Counter\Provider;
11
12use Bitrix\Main\ArgumentException;
13use Bitrix\Main\Loader;
14use Bitrix\Tasks\Internals\Counter;
15
16class WorkgroupListTasks implements Base
17{
18 private int $userId;
19
20 public function __construct(array $params = [])
21 {
22 $this->userId = (int)($params['userId'] ?? 0);
23
24 if ($this->userId <= 0)
25 {
26 throw new ArgumentException('Wrong userId value');
27 }
28 }
29
30 public function getCounterValue(): array
31 {
32 if (!Loader::includeModule('tasks'))
33 {
34 return [];
35 }
36
37 $counter = Counter::getInstance($this->userId);
38
39 return [
40 Counter\CounterDictionary::COUNTER_PROJECTS_MAJOR => (
41 $counter->get(Counter\CounterDictionary::COUNTER_GROUPS_TOTAL_COMMENTS)
42 + $counter->get(Counter\CounterDictionary::COUNTER_PROJECTS_TOTAL_COMMENTS)
43 + $counter->get(Counter\CounterDictionary::COUNTER_GROUPS_TOTAL_EXPIRED)
44 + $counter->get(Counter\CounterDictionary::COUNTER_PROJECTS_TOTAL_EXPIRED)
45 ),
46 Counter\CounterDictionary::COUNTER_SCRUM_TOTAL_COMMENTS => $counter->get(Counter\CounterDictionary::COUNTER_SCRUM_TOTAL_COMMENTS),
47 ];
48 }
49}
static getInstance()
Определения application.php:98
static includeModule($moduleName)
Определения loader.php:67
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$counter
Определения options.php:5
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799