Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
config.php
1
<?php
2
3
namespace
Bitrix\Pull\Controller
;
4
use \Bitrix\Main\Error;
5
6
class
Config
extends
\Bitrix\Main\Engine\Controller
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
}
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Controller\getCurrentUser
getCurrentUser()
Definition
controller.php:264
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Pull\Controller\Config\getAction
getAction($cache=true, $reopen=false)
Definition
config.php:8
Bitrix\Pull\Controller\Config\extendWatchAction
extendWatchAction(array $tags)
Definition
config.php:42
Bitrix\Pull\Controller\Config\getWithChannelId
getWithChannelId(string $channelId, string $channelPublicId='')
Definition
config.php:25
Bitrix\Main\Config
Definition
configuration.php:2
Bitrix\Pull\Controller
Definition
channel.php:3
modules
pull
lib
controller
config.php
Создано системой
1.10.0