Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
pushsmartfilter.php
1
<?php
2
namespace
Bitrix\Pull
;
3
4
class
PushSmartfilter
5
{
6
public
static
function
getStatus
($userId =
null
)
7
{
8
if
(!\CPullOptions::GetPushStatus())
9
{
10
return
null
;
11
}
12
13
if
(is_null($userId) && is_object(
$GLOBALS
[
'USER'
]))
14
{
15
$userId =
$GLOBALS
[
'USER'
]->getId();
16
}
17
$userId = intval($userId);
18
if
(!$userId)
19
{
20
return
false
;
21
}
22
23
return
(
bool
)\CUserOptions::GetOption(
'pull'
,
'push_smartfilter_status'
,
true
, $userId);
24
}
25
26
public
static
function
setStatus
($status, $userId =
null
)
27
{
28
if
(!\CPullOptions::GetPushStatus())
29
{
30
return
null
;
31
}
32
33
if
(is_null($userId) && is_object(
$GLOBALS
[
'USER'
]))
34
{
35
$userId =
$GLOBALS
[
'USER'
]->getId();
36
}
37
$userId = intval($userId);
38
if
(!$userId)
39
{
40
return
false
;
41
}
42
43
$status = $status ===
false
?
false
:
true
;
44
45
return
(
bool
)\CUserOptions::SetOption(
'pull'
,
'push_smartfilter_status'
, $status,
false
, $userId);
46
}
47
}
Bitrix\Pull\PushSmartfilter
Definition
pushsmartfilter.php:5
Bitrix\Pull\PushSmartfilter\getStatus
static getStatus($userId=null)
Definition
pushsmartfilter.php:6
Bitrix\Pull\PushSmartfilter\setStatus
static setStatus($status, $userId=null)
Definition
pushsmartfilter.php:26
Bitrix\Main\$GLOBALS
$GLOBALS['____1444769544']
Definition
license.php:1
Bitrix\Pull
modules
pull
lib
pushsmartfilter.php
Создано системой
1.10.0