|
ILIAS
release_8 Revision v8.24
|
Collaboration diagram for ilSearchResult:Public Member Functions | |
| __construct (int $a_user_id=0) | |
| Constructor @access public. More... | |
| setRequiredPermission (string $a_permission) | |
| Set the required permission for the rbac checks in function 'filter()'. More... | |
| getRequiredPermission () | |
| setUserId (int $a_user_id) | |
| getUserId () | |
| getEntries () | |
| isLimitReached () | |
| setMaxHits (int $a_max_hits) | |
| getMaxHits () | |
| isOffsetReached (int $a_counter) | |
| Check if offset is reached. More... | |
| addEntry (int $a_obj_id, string $a_type, array $found, int $a_child_id=0) | |
| add search result entry Entries are stored with 'obj_id'. More... | |
| numEntries () | |
| Check number of entries @access public. More... | |
| mergeEntries (ilSearchResult $result_obj) | |
| merge entries of this instance and another result object More... | |
| diffEntriesFromResult () | |
| diff entries of this instance and another result object Used for search in results More... | |
| intersectEntries (ilSearchResult $result_obj) | |
| Build intersection of entries (all entries that are present in both result sets) More... | |
| addResult (int $a_ref_id, int $a_obj_id, string $a_type) | |
| getResults () | |
| getResultIds () | |
| get result ids More... | |
| getResultsByObjId () | |
| getUniqueResults () | |
| Get unique results. More... | |
| getResultsForPresentation () | |
| getSubitemIds () | |
| filter (int $a_root_node, bool $check_and, ilDate $creation_filter_date=null, int $creation_filter_operator=null) | |
| Filter search result. More... | |
| filterResults (int $a_root_node) | |
| Filter search area of result set @access public. More... | |
| save (int $a_type=ilUserSearchCache::DEFAULT_SEARCH) | |
| Save search results. More... | |
| read (int $a_type=ilUserSearchCache::DEFAULT_SEARCH) | |
| read search results More... | |
| __updateEntryChilds (int $a_obj_id, array $a_childs) | |
| Update childs for a specific entry. More... | |
| __updateResultChilds (int $a_ref_id, array $a_childs) | |
| Update child ids for a specific result. More... | |
| __initSearchSettingsObject () | |
| preventOverwritingMaxhits (?bool $a_flag=null) | |
| If you call this function and pass "true" the maxhits setting will not be overwritten in __initSearchSettingsObject() @access public. More... | |
| addObserver (object $a_class, string $a_method) | |
| The observer is used to call functions for filtering result. More... | |
| callListeners (int $a_ref_id, array $a_data) | |
Data Fields | |
| bool | $limit_reached = false |
Protected Member Functions | |
| initUserSearchCache () | |
| Init user search cache. More... | |
Protected Attributes | |
| ilUserSearchCache | $search_cache |
| int | $offset = 0 |
| ilAccess | $ilAccess |
| ilDBInterface | $db |
| ilTree | $tree |
| ilObjUser | $user |
| ilSearchSettings | $search_settings |
| bool | $preventOverwritingMaxhits = false |
| ilLogger | $logger |
Private Attributes | |
| string | $permission = 'visible' |
| int | $user_id |
| array | $entries = array() |
| array | $results = array() |
| array | $observers = array() |
| int | $max_hits = 0 |
Definition at line 31 of file class.ilSearchResult.php.
| ilSearchResult::__construct | ( | int | $a_user_id = 0 | ) |
Constructor @access public.
Definition at line 64 of file class.ilSearchResult.php.
References $DIC, __initSearchSettingsObject(), initUserSearchCache(), ILIAS\Repository\logger(), and ILIAS\Repository\user().
Here is the call graph for this function:| ilSearchResult::__initSearchSettingsObject | ( | ) |
Definition at line 524 of file class.ilSearchResult.php.
Referenced by __construct().
Here is the caller graph for this function:| ilSearchResult::__updateEntryChilds | ( | int | $a_obj_id, |
| array | $a_childs | ||
| ) |
Update childs for a specific entry.
| int | object object_id |
| array | array of child ids. E.g 'pg', 'st' @access private |
Definition at line 496 of file class.ilSearchResult.php.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
Here is the caller graph for this function:| ilSearchResult::__updateResultChilds | ( | int | $a_ref_id, |
| array | $a_childs | ||
| ) |
Update child ids for a specific result.
Definition at line 511 of file class.ilSearchResult.php.
Referenced by filter().
Here is the caller graph for this function:| ilSearchResult::addEntry | ( | int | $a_obj_id, |
| string | $a_type, | ||
| array | $found, | ||
| int | $a_child_id = 0 |
||
| ) |
add search result entry Entries are stored with 'obj_id'.
This method is typically called to store db query results.
| int | object object_id |
| string | obj_type 'lm' or 'crs' ... |
| array | value position of query parser words in query string |
| int | child id e.g id of page or chapter |
Definition at line 143 of file class.ilSearchResult.php.
Referenced by diffEntriesFromResult(), intersectEntries(), and mergeEntries().
Here is the caller graph for this function:| ilSearchResult::addObserver | ( | object | $a_class, |
| string | $a_method | ||
| ) |
The observer is used to call functions for filtering result.
Every callback function should support the following parameters: array of ids. E.g: ref_id = 5,array(obj_id = 1,type = 'crs'), The function should return true or false.
| object | class of callback function |
| string | name of callback method |
Definition at line 570 of file class.ilSearchResult.php.
| ilSearchResult::addResult | ( | int | $a_ref_id, |
| int | $a_obj_id, | ||
| string | $a_type | ||
| ) |
Definition at line 243 of file class.ilSearchResult.php.
Referenced by filter().
Here is the caller graph for this function:| ilSearchResult::callListeners | ( | int | $a_ref_id, |
| array | $a_data | ||
| ) |
Definition at line 578 of file class.ilSearchResult.php.
Referenced by filter().
Here is the caller graph for this function:| ilSearchResult::diffEntriesFromResult | ( | ) |
diff entries of this instance and another result object Used for search in results
Definition at line 198 of file class.ilSearchResult.php.
References $ref_id, __updateEntryChilds(), addEntry(), and getEntries().
Here is the call graph for this function:| ilSearchResult::filter | ( | int | $a_root_node, |
| bool | $check_and, | ||
| ilDate | $creation_filter_date = null, |
||
| int | $creation_filter_operator = null |
||
| ) |
Filter search result.
Do RBAC checks. Allows paging of results for referenced objects
Definition at line 325 of file class.ilSearchResult.php.
References $ref_id, $type, __updateResultChilds(), ilDateTime\_after(), ilDateTime\_before(), ilDateTime\_equals(), ilObject\_exists(), ilObject\_getAllReferences(), ilObject\_lookupCreationDate(), ilObject\_lookupType(), addResult(), callListeners(), ilObjectSearch\CDATE_OPERATOR_AFTER, ilObjectSearch\CDATE_OPERATOR_BEFORE, ilObjectSearch\CDATE_OPERATOR_ON, ilAccess\checkAccessOfUser(), getMaxHits(), IL_CAL_DATE, and ROOT_FOLDER_ID.
Here is the call graph for this function:| ilSearchResult::filterResults | ( | int | $a_root_node | ) |
Filter search area of result set @access public.
Definition at line 455 of file class.ilSearchResult.php.
| ilSearchResult::getEntries | ( | ) |
Definition at line 106 of file class.ilSearchResult.php.
References $entries.
Referenced by diffEntriesFromResult(), intersectEntries(), mergeEntries(), and numEntries().
Here is the caller graph for this function:| ilSearchResult::getMaxHits | ( | ) |
Definition at line 120 of file class.ilSearchResult.php.
References $max_hits.
Referenced by filter().
Here is the caller graph for this function:| ilSearchResult::getRequiredPermission | ( | ) |
Definition at line 91 of file class.ilSearchResult.php.
References $permission.
| ilSearchResult::getResultIds | ( | ) |
get result ids
Definition at line 259 of file class.ilSearchResult.php.
References $id, and getResults().
Here is the call graph for this function:| ilSearchResult::getResults | ( | ) |
Definition at line 250 of file class.ilSearchResult.php.
References $results.
Referenced by getResultIds(), getResultsByObjId(), getResultsForPresentation(), and getSubitemIds().
Here is the caller graph for this function:| ilSearchResult::getResultsByObjId | ( | ) |
Definition at line 268 of file class.ilSearchResult.php.
References $ref_id, and getResults().
Here is the call graph for this function:| ilSearchResult::getResultsForPresentation | ( | ) |
Definition at line 296 of file class.ilSearchResult.php.
References $res, getResults(), and ILIAS\Repository\int().
Here is the call graph for this function:| ilSearchResult::getSubitemIds | ( | ) |
Definition at line 309 of file class.ilSearchResult.php.
References $res, and getResults().
Here is the call graph for this function:| ilSearchResult::getUniqueResults | ( | ) |
Get unique results.
Return an array of obj_id (No multiple results for references) Results are stored with 'ref_id'. This method is typically called after checking access of entries.
Definition at line 282 of file class.ilSearchResult.php.
| ilSearchResult::getUserId | ( | ) |
|
protected |
Init user search cache.
@access private
Definition at line 538 of file class.ilSearchResult.php.
References ilUserSearchCache\_getInstance().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::intersectEntries | ( | ilSearchResult | $result_obj | ) |
Build intersection of entries (all entries that are present in both result sets)
Definition at line 222 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), and getEntries().
Here is the call graph for this function:| ilSearchResult::isLimitReached | ( | ) |
Definition at line 111 of file class.ilSearchResult.php.
References $limit_reached.
| ilSearchResult::isOffsetReached | ( | int | $a_counter | ) |
Check if offset is reached.
Definition at line 128 of file class.ilSearchResult.php.
References $offset.
| ilSearchResult::mergeEntries | ( | ilSearchResult | $result_obj | ) |
merge entries of this instance and another result object
| object | result_obj @access public |
Definition at line 186 of file class.ilSearchResult.php.
References __updateEntryChilds(), addEntry(), and getEntries().
Referenced by ilSearchGUI\__performDetailsSearch().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::numEntries | ( | ) |
Check number of entries @access public.
Definition at line 175 of file class.ilSearchResult.php.
References getEntries().
Here is the call graph for this function:| ilSearchResult::preventOverwritingMaxhits | ( | ?bool | $a_flag = null | ) |
If you call this function and pass "true" the maxhits setting will not be overwritten in __initSearchSettingsObject() @access public.
| bool | null | $a_flag | true or false to set the flag or leave blank to get the status of the flag |
Definition at line 551 of file class.ilSearchResult.php.
| ilSearchResult::read | ( | int | $a_type = ilUserSearchCache::DEFAULT_SEARCH | ) |
read search results
| int | DEFAULT_SEARCH or ADVANCED_SEARCH @access public |
Definition at line 483 of file class.ilSearchResult.php.
| ilSearchResult::save | ( | int | $a_type = ilUserSearchCache::DEFAULT_SEARCH | ) |
Save search results.
| int | DEFAULT_SEARCH or ADVANCED_SEARCH |
Definition at line 473 of file class.ilSearchResult.php.
| ilSearchResult::setMaxHits | ( | int | $a_max_hits | ) |
Definition at line 116 of file class.ilSearchResult.php.
| ilSearchResult::setRequiredPermission | ( | string | $a_permission | ) |
Set the required permission for the rbac checks in function 'filter()'.
Definition at line 86 of file class.ilSearchResult.php.
| ilSearchResult::setUserId | ( | int | $a_user_id | ) |
Definition at line 97 of file class.ilSearchResult.php.
|
protected |
Definition at line 46 of file class.ilSearchResult.php.
|
private |
Definition at line 36 of file class.ilSearchResult.php.
Referenced by getEntries().
|
protected |
Definition at line 45 of file class.ilSearchResult.php.
| bool ilSearchResult::$limit_reached = false |
Definition at line 52 of file class.ilSearchResult.php.
Referenced by isLimitReached().
|
protected |
Definition at line 56 of file class.ilSearchResult.php.
|
private |
Definition at line 39 of file class.ilSearchResult.php.
Referenced by getMaxHits().
|
private |
Definition at line 38 of file class.ilSearchResult.php.
|
protected |
Definition at line 42 of file class.ilSearchResult.php.
Referenced by isOffsetReached().
|
private |
Definition at line 33 of file class.ilSearchResult.php.
Referenced by getRequiredPermission().
|
protected |
Definition at line 54 of file class.ilSearchResult.php.
|
private |
Definition at line 37 of file class.ilSearchResult.php.
Referenced by getResults().
|
protected |
Definition at line 41 of file class.ilSearchResult.php.
|
protected |
Definition at line 49 of file class.ilSearchResult.php.
|
protected |
Definition at line 47 of file class.ilSearchResult.php.
|
protected |
Definition at line 48 of file class.ilSearchResult.php.
|
private |
Definition at line 35 of file class.ilSearchResult.php.
Referenced by getUserId().