|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Collaboration diagram for ilSearchResult:Public Member Functions | |
| __construct (int $a_user_id=0) | |
| 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, string $a_child_type='') | |
| add search result entry Entries are stored with 'obj_id'. More... | |
| numEntries () | |
| 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 () | |
| getResultsByObjId () | |
| getUniqueResults () | |
| Get unique results. More... | |
| getResultsForPresentation () | |
| getSubitemIds () | |
| filter (int $a_root_node, bool $check_and, ?ilDate $creation_filter_date_start=null, ?ilDate $creation_filter_date_end=null, array $copyright_identifiers=[]) | |
| Filter search result. More... | |
| filterResults (int $a_root_node) | |
| Filter search area of result set. More... | |
| save (int $a_type=ilUserSearchCache::DEFAULT_SEARCH) | |
| read (int $a_type=ilUserSearchCache::DEFAULT_SEARCH) | |
| __updateEntryChilds (int $a_obj_id, array $a_childs) | |
| __updateResultChilds (int $a_ref_id, array $a_childs) | |
| Update children 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 | |
| findEntriesWithCopyright (string ... $copyright_identifiers) | |
| initUserSearchCache () | |
Protected Attributes | |
| ilUserSearchCache | $search_cache |
| int | $offset = 0 |
| ilAccess | $ilAccess |
| ilDBInterface | $db |
| ilTree | $tree |
| ilObjUser | $user |
| ilSearchSettings | $search_settings |
| LOMServices | $lom_services |
| 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 |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning searchResult stores all result of a search query. Offers methods like mergeResults. To merge result sets of different queries.
Definition at line 28 of file class.ilSearchResult.php.
| ilSearchResult::__construct | ( | int | $a_user_id = 0 | ) |
Definition at line 56 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 555 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 | ||
| ) |
| int | $a_obj_id | |
| array | $a_childs | array of children as ['id' => $id, 'type' => $type]. E.g 'pg', 'st' |
Definition at line 528 of file class.ilSearchResult.php.
| ilSearchResult::__updateResultChilds | ( | int | $a_ref_id, |
| array | $a_childs | ||
| ) |
Update children for a specific result.
Definition at line 544 of file class.ilSearchResult.php.
| ilSearchResult::addEntry | ( | int | $a_obj_id, |
| string | $a_type, | ||
| array | $found, | ||
| int | $a_child_id = 0, |
||
| string | $a_child_type = '' |
||
| ) |
add search result entry Entries are stored with 'obj_id'.
This method is typically called to store db query results.
| int | $a_obj_id | object object_id |
| string | $a_type | obj_type 'lm' or 'crs' ... |
| array | $found | value position of query parser words in query string |
| int | $a_child_id | child id e.g id of page or chapter |
| string | $a_child_type | child type e.g 'pg' or 'st' |
Definition at line 136 of file class.ilSearchResult.php.
| 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 | $a_class | class of callback function |
| string | $a_method | name of callback method |
Definition at line 595 of file class.ilSearchResult.php.
| ilSearchResult::addResult | ( | int | $a_ref_id, |
| int | $a_obj_id, | ||
| string | $a_type | ||
| ) |
Definition at line 238 of file class.ilSearchResult.php.
| ilSearchResult::callListeners | ( | int | $a_ref_id, |
| array | $a_data | ||
| ) |
Definition at line 603 of file class.ilSearchResult.php.
| ilSearchResult::diffEntriesFromResult | ( | ) |
diff entries of this instance and another result object Used for search in results
Definition at line 193 of file class.ilSearchResult.php.
References $ref_id.
| ilSearchResult::filter | ( | int | $a_root_node, |
| bool | $check_and, | ||
| ?ilDate | $creation_filter_date_start = null, |
||
| ?ilDate | $creation_filter_date_end = null, |
||
| array | $copyright_identifiers = [] |
||
| ) |
Filter search result.
Do RBAC checks. Allows paging of results for referenced objects
| string[] | $copyright_identifiers |
Definition at line 320 of file class.ilSearchResult.php.
| ilSearchResult::filterResults | ( | int | $a_root_node | ) |
Filter search area of result set.
Definition at line 501 of file class.ilSearchResult.php.
|
protected |
| string | ...$copyright_identifiers |
Definition at line 470 of file class.ilSearchResult.php.
References $results.
| ilSearchResult::getEntries | ( | ) |
Definition at line 98 of file class.ilSearchResult.php.
References $entries.
Referenced by intersectEntries(), and mergeEntries().
Here is the caller graph for this function:| ilSearchResult::getMaxHits | ( | ) |
Definition at line 112 of file class.ilSearchResult.php.
References $max_hits.
| ilSearchResult::getRequiredPermission | ( | ) |
Definition at line 84 of file class.ilSearchResult.php.
References $permission.
| ilSearchResult::getResultIds | ( | ) |
Definition at line 253 of file class.ilSearchResult.php.
References $id.
| ilSearchResult::getResults | ( | ) |
Definition at line 245 of file class.ilSearchResult.php.
References $results.
| ilSearchResult::getResultsByObjId | ( | ) |
Definition at line 262 of file class.ilSearchResult.php.
References $ref_id.
| ilSearchResult::getResultsForPresentation | ( | ) |
Definition at line 289 of file class.ilSearchResult.php.
References $res, and ILIAS\Repository\int().
Here is the call graph for this function:| ilSearchResult::getSubitemIds | ( | ) |
Definition at line 305 of file class.ilSearchResult.php.
References $res.
| 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 275 of file class.ilSearchResult.php.
| ilSearchResult::getUserId | ( | ) |
|
protected |
Definition at line 563 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 217 of file class.ilSearchResult.php.
References getEntries().
Here is the call graph for this function:| ilSearchResult::isLimitReached | ( | ) |
Definition at line 103 of file class.ilSearchResult.php.
References $limit_reached.
| ilSearchResult::isOffsetReached | ( | int | $a_counter | ) |
Check if offset is reached.
Definition at line 120 of file class.ilSearchResult.php.
References $offset.
| ilSearchResult::mergeEntries | ( | ilSearchResult | $result_obj | ) |
merge entries of this instance and another result object
Definition at line 181 of file class.ilSearchResult.php.
References getEntries().
Referenced by ILIAS\Search\GUI\Direct\SearcherImpl\searchDetails().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSearchResult::numEntries | ( | ) |
Definition at line 172 of file class.ilSearchResult.php.
| 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 576 of file class.ilSearchResult.php.
| ilSearchResult::read | ( | int | $a_type = ilUserSearchCache::DEFAULT_SEARCH | ) |
Definition at line 518 of file class.ilSearchResult.php.
| ilSearchResult::save | ( | int | $a_type = ilUserSearchCache::DEFAULT_SEARCH | ) |
Definition at line 513 of file class.ilSearchResult.php.
| ilSearchResult::setMaxHits | ( | int | $a_max_hits | ) |
Definition at line 108 of file class.ilSearchResult.php.
| ilSearchResult::setRequiredPermission | ( | string | $a_permission | ) |
Set the required permission for the rbac checks in function 'filter()'.
Definition at line 79 of file class.ilSearchResult.php.
| ilSearchResult::setUserId | ( | int | $a_user_id | ) |
Definition at line 89 of file class.ilSearchResult.php.
|
protected |
Definition at line 43 of file class.ilSearchResult.php.
|
private |
Definition at line 33 of file class.ilSearchResult.php.
Referenced by getEntries().
|
protected |
Definition at line 42 of file class.ilSearchResult.php.
| bool ilSearchResult::$limit_reached = false |
Definition at line 50 of file class.ilSearchResult.php.
Referenced by isLimitReached().
|
protected |
Definition at line 54 of file class.ilSearchResult.php.
|
protected |
Definition at line 47 of file class.ilSearchResult.php.
|
private |
Definition at line 36 of file class.ilSearchResult.php.
Referenced by getMaxHits().
|
private |
Definition at line 35 of file class.ilSearchResult.php.
|
protected |
Definition at line 39 of file class.ilSearchResult.php.
Referenced by isOffsetReached().
|
private |
Definition at line 30 of file class.ilSearchResult.php.
Referenced by getRequiredPermission().
|
protected |
Definition at line 52 of file class.ilSearchResult.php.
|
private |
Definition at line 34 of file class.ilSearchResult.php.
|
protected |
Definition at line 38 of file class.ilSearchResult.php.
|
protected |
Definition at line 46 of file class.ilSearchResult.php.
|
protected |
Definition at line 44 of file class.ilSearchResult.php.
|
protected |
Definition at line 45 of file class.ilSearchResult.php.
|
private |
Definition at line 32 of file class.ilSearchResult.php.
Referenced by getUserId().