ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeUserOrgUnitSearch Class Reference

Description of class class. More...

+ Inheritance diagram for ilLikeUserOrgUnitSearch:
+ Collaboration diagram for ilLikeUserOrgUnitSearch:

Public Member Functions

 __construct ($qp_obj)
 
 performSearch ()
 
 __createWhereCondition ()
 Create where condition type $ilDB. More...
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
 performSearch ()
 

Data Fields

const ORG_ASSIGNMENTS_TABLE = 'orgu_user_assignments'
 
- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Private Attributes

 $org_tree = null
 

Detailed Description

Description of class class.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 13 of file class.ilLikeUserOrgUnitSearch.php.

Constructor & Destructor Documentation

◆ __construct()

ilLikeUserOrgUnitSearch::__construct (   $qp_obj)

Definition at line 24 of file class.ilLikeUserOrgUnitSearch.php.

References ilObjOrgUnitTree\_getInstance().

25  {
26  parent::__construct($qp_obj);
27 
28  $this->org_tree = ilObjOrgUnitTree::_getInstance();
29  $this->org_tree->buildTempTableWithUsrAssignements(self::ORG_ASSIGNMENTS_TABLE);
30  }
+ Here is the call graph for this function:

Member Function Documentation

◆ __createWhereCondition()

ilLikeUserOrgUnitSearch::__createWhereCondition ( )

Create where condition type $ilDB.

Returns
type

Definition at line 58 of file class.ilLikeUserOrgUnitSearch.php.

References $counter, and $ilDB.

Referenced by performSearch().

59  {
60  global $ilDB;
61 
62  $where = 'WHERE ';
63  $counter = 0;
64  foreach ($this->query_parser->getQuotedWords() as $word) {
65  if ($counter++) {
66  $and .= " OR ";
67  }
68  $where .= ('ref_id = ' . $ilDB->quote($word, 'integer'));
69  }
70  return $where;
71  }
$counter
global $ilDB
+ Here is the caller graph for this function:

◆ performSearch()

ilLikeUserOrgUnitSearch::performSearch ( )

Definition at line 33 of file class.ilLikeUserOrgUnitSearch.php.

References $GLOBALS, $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __createWhereCondition(), and ilDBConstants\FETCHMODE_OBJECT.

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  }
__createLocateString()
build locate string in case of AND search
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
__createWhereCondition()
Create where condition type $ilDB.
foreach($_POST as $key=> $value) $res
$query
+ Here is the call graph for this function:

Field Documentation

◆ $org_tree

ilLikeUserOrgUnitSearch::$org_tree = null
private

Definition at line 20 of file class.ilLikeUserOrgUnitSearch.php.

◆ ORG_ASSIGNMENTS_TABLE

const ilLikeUserOrgUnitSearch::ORG_ASSIGNMENTS_TABLE = 'orgu_user_assignments'

Definition at line 15 of file class.ilLikeUserOrgUnitSearch.php.


The documentation for this class was generated from the following file: