Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
IBlockListFilter.php
1
<?php
2
3
namespace
Bitrix\Lists\Api\Data\IBlockService
;
4
5
use
Bitrix\Lists\Api\Data\Filter
;
6
7
class
IBlockListFilter
extends
Filter
8
{
9
public
const
ALLOWABLE_FIELDS
= [
10
'ID'
,
11
'ACTIVE'
,
12
'TYPE'
,
13
'SITE_ID'
,
14
'SOCNET_GROUP_ID'
,
15
'CHECK_PERMISSIONS'
,
16
];
17
18
public
function
setField
(
string
$fieldId, $value,
string
$operator =
''
): static
19
{
20
if
($fieldId ===
'CHECK_PERMISSIONS'
)
21
{
22
return
$this->
setCheckPermission
(is_bool($value) ? $value : ($value ===
'Y'
));
23
}
24
25
return
parent::setField($fieldId, $value, $operator);
26
}
27
28
public
function
setActive
(
bool
$value): static
29
{
30
return
$this->
setField
(
'ACTIVE'
, $value ?
'Y'
:
'N'
);
31
}
32
33
public
function
setIBLockTypeId
(
string
$iBlockTypeId): static
34
{
35
return
$this->
setField
(
'TYPE'
, $iBlockTypeId);
36
}
37
38
public
function
setSite
($siteId): static
39
{
40
return
$this->
setField
(
'SITE_ID'
, $siteId);
41
}
42
43
public
function
setSocNetGroupId
(
int
$groupId): static
44
{
45
if
($groupId > 0)
46
{
47
return
$this->
setField
(
'SOCNET_GROUP_ID'
, $groupId,
'='
);
48
}
49
50
return
$this;
51
}
52
53
public
function
setCheckPermission
(
bool
$value): static
54
{
55
$this->filter[
'CHECK_PERMISSIONS'
] = $value ?
'Y'
:
'N'
;
56
$this->keyMatching[
'CHECK_PERMISSIONS'
] =
'CHECK_PERMISSIONS'
;
57
58
return
$this;
59
}
60
}
Bitrix\Lists\Api\Data\Filter
Definition
Filter.php:6
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter
Definition
IBlockListFilter.php:8
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setCheckPermission
setCheckPermission(bool $value)
Definition
IBlockListFilter.php:53
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setActive
setActive(bool $value)
Definition
IBlockListFilter.php:28
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\ALLOWABLE_FIELDS
const ALLOWABLE_FIELDS
Definition
IBlockListFilter.php:9
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setSocNetGroupId
setSocNetGroupId(int $groupId)
Definition
IBlockListFilter.php:43
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setSite
setSite($siteId)
Definition
IBlockListFilter.php:38
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setField
setField(string $fieldId, $value, string $operator='')
Definition
IBlockListFilter.php:18
Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter\setIBLockTypeId
setIBLockTypeId(string $iBlockTypeId)
Definition
IBlockListFilter.php:33
Bitrix\Lists\Api\Data\IBlockService
Definition
IBlockElementFilter.php:3
modules
lists
lib
Api
Data
IBlockService
IBlockListFilter.php
Создано системой
1.10.0