Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
config.php
1<?php
2
4use \Bitrix\Main\Error;
5
7{
8 public function getAction($cache = true, $reopen = false)
9 {
10 $config = \Bitrix\Pull\Config::get([
11 'CACHE' => $cache,
12 'REOPEN' => $reopen,
13 'JSON' => true
14 ]);
15
16 if (!$config)
17 {
18 $this->errorCollection[] = new Error("Push & Pull server is not configured", "SERVER_ERROR");
19 return null;
20 }
21
22 return $config;
23 }
24
25 public function getWithChannelId(string $channelId, string $channelPublicId = '')
26 {
27 $config = \Bitrix\Pull\Config::get([
28 'CHANNEL_ID' => $channelId,
29 'CHANNEL_PUBLIC_ID' => $channelPublicId,
30 'JSON' => true
31 ]);
32
33 if (!$config)
34 {
35 $this->errorCollection[] = new Error("Push & Pull server is not configured", "SERVER_ERROR");
36 return null;
37 }
38
39 return $config;
40 }
41
42 public function extendWatchAction(array $tags)
43 {
44 $currentUserId = $this->getCurrentUser()->getId();
45
46 return \CPullWatch::Extend($currentUserId, $tags);
47 }
48}
getAction($cache=true, $reopen=false)
Definition config.php:8
extendWatchAction(array $tags)
Definition config.php:42
getWithChannelId(string $channelId, string $channelPublicId='')
Definition config.php:25