Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
blockfilter.php
1
<?php
2
namespace
Bitrix\Landing\Source
;
3
4
5
class
BlockFilter
6
{
11
public
static
function
checkRow
($row)
12
{
13
if
(empty($row) || !is_array($row))
14
{
15
return
false
;
16
}
17
if
(empty($row[
'name'
]) || !is_string($row[
'name'
]))
18
{
19
return
false
;
20
}
21
if
(empty($row[
'key'
]) || !is_string($row[
'key'
]))
22
{
23
return
false
;
24
}
25
if
(empty($row[
'value'
]) || !is_array($row[
'value'
]))
26
{
27
return
false
;
28
}
29
return
true
;
30
}
31
36
public
static
function
checkPreparedRow
($row)
37
{
38
if
(empty($row) || !is_array($row))
39
{
40
return
false
;
41
}
42
if
(empty($row[
'key'
]) || empty($row[
'value'
]) || !is_array($row[
'value'
]))
43
{
44
return
false
;
45
}
46
return
true
;
47
}
48
55
public
static
function
createRow
(
string
$name,
string
$key, array $value)
56
{
57
$name = trim($name);
58
$key = trim($key);
59
if
($name ===
''
|| $key ===
''
|| empty($value))
60
{
61
return
null
;
62
}
63
return
[
64
'name'
=> $name,
65
'key'
=> $key,
66
'value'
=> $value
67
];
68
}
69
}
Bitrix\Landing\Source\BlockFilter
Definition
blockfilter.php:6
Bitrix\Landing\Source\BlockFilter\checkRow
static checkRow($row)
Definition
blockfilter.php:11
Bitrix\Landing\Source\BlockFilter\checkPreparedRow
static checkPreparedRow($row)
Definition
blockfilter.php:36
Bitrix\Landing\Source\BlockFilter\createRow
static createRow(string $name, string $key, array $value)
Definition
blockfilter.php:55
Bitrix\Landing\Source
Definition
blockfilter.php:2
modules
landing
lib
source
blockfilter.php
Создано системой
1.10.0