ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilMediaPoolSearch.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15
include_once
'Services/Search/classes/class.ilAbstractSearch.php'
;
16
17
class
ilMediaPoolSearch
extends
ilAbstractSearch
18
{
19
function
&
performSearch
()
20
{
21
$this->
setFields
(
array
(
'title'
));
22
23
$and = $this->__createAndCondition();
24
$locate = $this->
__createLocateString
();
25
26
$query
=
"SELECT mep_id,obj_id "
.
27
$locate.
28
"FROM mep_tree JOIN mep_item ON child = obj_id "
.
29
$and;
30
31
$res
= $this->db->query(
$query
);
32
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
))
33
{
34
$this->search_result->addEntry(
$row
->mep_id,
'mep'
,$this->__prepareFound(
$row
),
$row
->obj_id);
35
}
36
return
$this->search_result
;
37
}
38
39
public
function
performKeywordSearch
()
40
{
41
$this->
setFields
(
array
(
'keyword'
));
42
43
$and = $this->__createKeywordAndCondition();
44
$locate = $this->
__createLocateString
();
45
46
47
$query
=
"SELECT mep_id, child "
.
48
$locate.
49
"FROM mep_item mi "
.
50
"JOIN mep_tree ON mi.obj_id = child "
.
51
"JOIN il_meta_keyword mk ON foreign_id = mk.obj_id "
.
52
$and.
53
"AND obj_type = 'mob'"
;
54
55
$res
= $this->db->query(
$query
);
56
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
))
57
{
58
$this->search_result->addEntry(
$row
->mep_id,
'mep'
,$this->__prepareFound(
$row
),
$row
->child);
59
}
60
return
$this->search_result
;
61
}
62
}
63
?>
ilAbstractSearch
Definition:
class.ilAbstractSearch.php:16
$res
$res
Definition:
examplelayouts.sql.php:25
ilAbstractSearch\__createLocateString
__createLocateString()
build locate string in case of AND search
Definition:
class.ilAbstractSearch.php:144
$query
$query
Definition:
examplelayouts.sql.php:24
ilAbstractSearch\setFields
setFields($a_fields)
Set fields to search.
Definition:
class.ilAbstractSearch.php:62
ilMediaPoolSearch\performKeywordSearch
performKeywordSearch()
Definition:
class.ilMediaPoolSearch.php:39
ilMediaPoolSearch\performSearch
& performSearch()
Definition:
class.ilMediaPoolSearch.php:19
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
$row
$row
Definition:
10autofilter-selection-1.php:74
ilMediaPoolSearch
Definition:
class.ilMediaPoolSearch.php:17
ilAbstractSearch\$search_result
$search_result
Definition:
class.ilAbstractSearch.php:30
Services
Search
classes
class.ilMediaPoolSearch.php
Generated on Fri Jan 24 2025 19:01:13 for ILIAS by
1.8.13 (using
Doxyfile
)