ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilLikeUserOrgUnitSearch Class Reference

Description of class class. More...

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

Public Member Functions

 __construct ($qp_obj)
 
 performSearch ()
 
 __createWhereCondition ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Data Fields

const ORG_ASSIGNMENTS_TABLE = 'orgu_user_assignements'
 

Private Attributes

ilObjOrgUnitTree $org_tree
 

Additional Inherited Members

- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types
 

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 21 of file class.ilLikeUserOrgUnitSearch.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct(), and ilObjOrgUnitTree\_getInstance().

22  {
23  parent::__construct($qp_obj);
24 
25  $this->org_tree = ilObjOrgUnitTree::_getInstance();
26  $this->org_tree->buildTempTableWithUsrAssignements(self::ORG_ASSIGNMENTS_TABLE);
27  }
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ __createWhereCondition()

ilLikeUserOrgUnitSearch::__createWhereCondition ( )

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

Referenced by performSearch().

47  : string
48  {
49  $and = '';
50  $where = 'WHERE ';
51  $counter = 0;
52  foreach ($this->query_parser->getQuotedWords() as $word) {
53  if ($counter++) {
54  $and .= " OR ";
55  }
56  $where .= ('ref_id = ' . $this->db->quote($word, 'integer'));
57  }
58  return $where;
59  }
+ Here is the caller graph for this function:

◆ performSearch()

ilLikeUserOrgUnitSearch::performSearch ( )

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

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

31  {
32  $where = $this->__createWhereCondition();
33  $locate = $this->__createLocateString();
34 
35  $query = 'SELECT user_id ' .
36  'FROM ' . self::ORG_ASSIGNMENTS_TABLE . ' ' .
37  $where;
38 
39  $res = $this->db->query($query);
40  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
41  $this->search_result->addEntry($row->user_id, 'user', $this->__prepareFound($row));
42  }
43  return $this->search_result;
44  }
$res
Definition: ltiservices.php:69
ilSearchResult $search_result
+ Here is the call graph for this function:

Field Documentation

◆ $org_tree

ilObjOrgUnitTree ilLikeUserOrgUnitSearch::$org_tree
private

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

◆ ORG_ASSIGNMENTS_TABLE

const ilLikeUserOrgUnitSearch::ORG_ASSIGNMENTS_TABLE = 'orgu_user_assignements'

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


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