ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilLikeUserOrgUnitSearch.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
include_once
'./Services/Search/classes/class.ilAbstractSearch.php'
;
6
include_once
'./Modules/OrgUnit/classes/class.ilObjOrgUnitTree.php'
;
13
class
ilLikeUserOrgUnitSearch
extends
ilAbstractSearch
14
{
15
const
ORG_ASSIGNMENTS_TABLE
=
'orgu_user_assignements'
;
16
20
private
$org_tree
= null;
21
22
23
24
public
function
__construct
($qp_obj)
25
{
26
parent::__construct($qp_obj);
27
28
$this->org_tree =
ilObjOrgUnitTree::_getInstance
();
29
$this->org_tree->buildTempTableWithUsrAssignements(self::ORG_ASSIGNMENTS_TABLE);
30
}
31
32
33
public
function
performSearch
()
34
{
35
$where = $this->
__createWhereCondition
();
36
$locate = $this->
__createLocateString
();
37
38
$query
=
'SELECT user_id '
.
39
'FROM '
. self::ORG_ASSIGNMENTS_TABLE .
' '
.
40
$where;
41
42
$GLOBALS
[
'DIC'
]->logger()->src()->debug(
$query
);
43
44
$res
= $this->db->query(
$query
);
45
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
46
$this->search_result->addEntry(
$row
->user_id,
'user'
, $this->__prepareFound(
$row
));
47
}
48
49
return
$this->search_result
;
50
}
51
52
58
public
function
__createWhereCondition
()
59
{
60
global
$DIC
;
61
62
$ilDB
= $DIC[
'ilDB'
];
63
64
$where =
'WHERE '
;
65
$counter = 0;
66
foreach
($this->query_parser->getQuotedWords() as $word) {
67
if
($counter++) {
68
$and .=
" OR "
;
69
}
70
$where .= (
'ref_id = '
.
$ilDB
->quote($word,
'integer'
));
71
}
72
return
$where;
73
}
74
}
ilLikeUserOrgUnitSearch\$org_tree
$org_tree
Definition:
class.ilLikeUserOrgUnitSearch.php:20
ilAbstractSearch
Definition:
class.ilAbstractSearch.php:16
$DIC
global $DIC
Definition:
saml.php:7
ilAbstractSearch\__createLocateString
__createLocateString()
build locate string in case of AND search
Definition:
class.ilAbstractSearch.php:143
ilObjOrgUnitTree\_getInstance
static _getInstance()
Definition:
class.ilObjOrgUnitTree.php:64
ilLikeUserOrgUnitSearch\__createWhereCondition
__createWhereCondition()
Create where condition type $ilDB.
Definition:
class.ilLikeUserOrgUnitSearch.php:58
ilLikeUserOrgUnitSearch\performSearch
performSearch()
Definition:
class.ilLikeUserOrgUnitSearch.php:33
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilLikeUserOrgUnitSearch\__construct
__construct($qp_obj)
Definition:
class.ilLikeUserOrgUnitSearch.php:24
ilLikeUserOrgUnitSearch
Description of class class.
Definition:
class.ilLikeUserOrgUnitSearch.php:13
ilLikeUserOrgUnitSearch\ORG_ASSIGNMENTS_TABLE
const ORG_ASSIGNMENTS_TABLE
Definition:
class.ilLikeUserOrgUnitSearch.php:15
$GLOBALS
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Definition:
module.tag.xmp.php:702
ilAbstractSearch\$search_result
$search_result
Definition:
class.ilAbstractSearch.php:30
Services
Search
classes
Like
class.ilLikeUserOrgUnitSearch.php
Generated on Thu Jan 30 2025 19:02:04 for ILIAS by
1.8.13 (using
Doxyfile
)