ILIAS
trunk Revision v11.0_alpha-1689-g66c127b4ae8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
class.ilLikeUserDefinedFieldSearch.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
30
class
ilLikeUserDefinedFieldSearch
extends
ilUserDefinedFieldSearch
31
{
32
public
function
setFields
(array $a_fields): void
33
{
34
$fields
= [];
35
foreach
($a_fields as $field) {
36
$fields
[] =
'f_'
. $field;
37
}
38
parent::setFields(
$fields
);
39
}
40
41
42
public
function
__createWhereCondition
(): string
43
{
44
$fields
= $this->
getFields
();
45
$field =
$fields
[0];
46
47
$and =
" WHERE field_id = "
. $this->db->quote((
int
) substr($field, 2),
"integer"
) .
" AND ( "
;
48
$counter = 0;
49
foreach
($this->query_parser->getQuotedWords() as $word) {
50
if
($counter++) {
51
$and .=
" OR "
;
52
}
53
54
if
(strpos($word,
'^'
) === 0) {
55
$and .= $this->db->like(
"value"
,
"text"
, substr($word, 1) .
"%"
);
56
}
else
{
57
$and .= $this->db->like(
"value"
,
"text"
,
"%"
. $word .
"%"
);
58
}
59
}
60
return
$and .
") "
;
61
}
62
}
ilAbstractSearch\getFields
getFields()
Definition:
class.ilAbstractSearch.php:99
ilLikeUserDefinedFieldSearch
Definition:
class.ilLikeUserDefinedFieldSearch.php:30
ilAbstractSearch\$fields
array $fields
Definition:
class.ilAbstractSearch.php:51
ilUserDefinedFieldSearch
Class ilUserSearch.
Definition:
class.ilUserDefinedFieldSearch.php:28
ilLikeUserDefinedFieldSearch\setFields
setFields(array $a_fields)
Definition:
class.ilLikeUserDefinedFieldSearch.php:32
ilLikeUserDefinedFieldSearch\__createWhereCondition
__createWhereCondition()
Definition:
class.ilLikeUserDefinedFieldSearch.php:42
components
ILIAS
Search
classes
Like
class.ilLikeUserDefinedFieldSearch.php
Generated on Wed Apr 2 2025 23:03:31 for ILIAS by
1.8.13 (using
Doxyfile
)