Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
NameSearchFilter.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Space\List\Query\Filter\Search
;
4
5
use
Bitrix\Main\ORM\Query\Query
;
6
use
Bitrix\Socialnetwork\Space\List\Query\Filter\FilterInterface
;
7
8
final
class
NameSearchFilter
implements
FilterInterface
9
{
10
public
function
__construct
(
private
string
$searchString)
11
{}
12
13
public
function
apply
(
Query
$query): void
14
{
15
$searchStringPrepared = addcslashes($this->searchString,
'%_'
);
16
$query->whereLike(
'NAME'
,
"%$searchStringPrepared%"
);
17
}
18
}
Bitrix\Main\ORM\Query\Query
Definition
query.php:118
Bitrix\Socialnetwork\Space\List\Query\Filter\Search\NameSearchFilter
Definition
NameSearchFilter.php:9
Bitrix\Socialnetwork\Space\List\Query\Filter\Search\NameSearchFilter\apply
apply(Query $query)
Definition
NameSearchFilter.php:13
Bitrix\Socialnetwork\Space\List\Query\Filter\Search\NameSearchFilter\__construct
__construct(private string $searchString)
Definition
NameSearchFilter.php:10
Bitrix\Socialnetwork\Space\List\Query\Filter\FilterInterface
Definition
FilterInterface.php:8
Bitrix\Socialnetwork\Space\List\Query\Filter\Search
Definition
NameSearchFilter.php:3
modules
socialnetwork
lib
Space
List
Query
Filter
Search
NameSearchFilter.php
Создано системой
1.10.0