ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Search\GUI\AbstractSearchStateHandlerImpl Class Reference
+ Inheritance diagram for ILIAS\Search\GUI\AbstractSearchStateHandlerImpl:
+ Collaboration diagram for ILIAS\Search\GUI\AbstractSearchStateHandlerImpl:

Public Member Functions

 __construct (protected HTTP $http, protected Refinery $refinery)
 
 fetchMaxPage ()
 
 resetMaxPage ()
 
 updateMaxPage (int $max_page)
 
 fetchRequestedPage ()
 
 fetchSortation ()
 
 fetchRequestedSearchTerm ()
 propably needs to be replaced with a completely different mechanism when switching to KS More...
 
 fetchRequestedRemoteSearchTerm ()
 propably needs to be replaced with a completely different mechanism when switching to KS More...
 
 fetchRequestedAutoCompleteSearchTerm ()
 propably needs to be replaced with a completely different mechanism when switching to KS More...
 
 fetchRequestedRemoteScope ()
 propably needs to be replaced with a completely different mechanism when switching to KS More...
 
 fetchCache (int $usr_id)
 
 fetchFilter (URI $action)
 
 loadFilterToCache (ilSearchFilterGUI $filter, ilUserSearchCache $cache)
 
 fetchMaxPage ()
 
 resetMaxPage ()
 
 updateMaxPage (int $max_page)
 
 fetchRequestedPage ()
 
 fetchSortation ()
 
 fetchRequestedSearchTerm ()
 
 fetchRequestedRemoteSearchTerm ()
 
 fetchRequestedAutoCompleteSearchTerm ()
 
 fetchRequestedRemoteScope ()
 
 fetchCache (int $usr_id)
 
 fetchFilter (URI $action)
 
 loadFilterToCache (ilSearchFilterGUI $filter, ilUserSearchCache $cache)
 

Detailed Description

Definition at line 31 of file AbstractSearchStateHandlerImpl.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::__construct ( protected HTTP  $http,
protected Refinery  $refinery 
)

Definition at line 33 of file AbstractSearchStateHandlerImpl.php.

36 {
37 }

Member Function Documentation

◆ fetchCache()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchCache ( int  $usr_id)
abstract

◆ fetchFilter()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchFilter ( URI  $action)
abstract

◆ fetchMaxPage()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchMaxPage ( )

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 39 of file AbstractSearchStateHandlerImpl.php.

39 : int
40 {
41 return (int) (ilSession::get(Param::MAX_PAGE->value) ?? 1);
42 }
static get(string $a_var)

References ilSession\get().

+ Here is the call graph for this function:

◆ fetchRequestedAutoCompleteSearchTerm()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchRequestedAutoCompleteSearchTerm ( )

propably needs to be replaced with a completely different mechanism when switching to KS

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 103 of file AbstractSearchStateHandlerImpl.php.

103 : string
104 {
105 if ($this->http->wrapper()->post()->has('term')) {
106 return $this->http->wrapper()->post()->retrieve(
107 'term',
108 $this->refinery->kindlyTo()->string()
109 );
110 }
111 return '';
112 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ fetchRequestedPage()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchRequestedPage ( )

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 54 of file AbstractSearchStateHandlerImpl.php.

54 : int
55 {
56 if ($this->http->wrapper()->query()->has(Param::PAGE_NUMBER->value)) {
57 // pages in the view control are 0-indexed, in search 1-indexed
58 return $this->http->wrapper()->query()->retrieve(
59 Param::PAGE_NUMBER->value,
60 $this->refinery->kindlyTo()->int()
61 ) + 1;
62 }
63 return 1;
64 }

References ILIAS\FileDelivery\http(), ILIAS\Search\GUI\PAGE_NUMBER, and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ fetchRequestedRemoteScope()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchRequestedRemoteScope ( )

propably needs to be replaced with a completely different mechanism when switching to KS

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 118 of file AbstractSearchStateHandlerImpl.php.

118 : int
119 {
120 if ($this->http->wrapper()->post()->has('root_id')) {
121 return $this->http->wrapper()->post()->retrieve(
122 'root_id',
123 $this->refinery->kindlyTo()->int()
124 );
125 }
126 return ROOT_FOLDER_ID;
127 }
const ROOT_FOLDER_ID
Definition: constants.php:32

References ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ fetchRequestedRemoteSearchTerm()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchRequestedRemoteSearchTerm ( )
abstract

propably needs to be replaced with a completely different mechanism when switching to KS

Implements ILIAS\Search\GUI\SearchStateHandler.

Reimplemented in ILIAS\Search\GUI\Direct\SearchStateHandlerImpl, and ILIAS\Search\GUI\Lucene\SearchStateHandlerImpl.

◆ fetchRequestedSearchTerm()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchRequestedSearchTerm ( )

propably needs to be replaced with a completely different mechanism when switching to KS

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 82 of file AbstractSearchStateHandlerImpl.php.

82 : string
83 {
84 if ($this->http->wrapper()->post()->has('term')) {
85 return $this->http->wrapper()->post()->retrieve(
86 'term',
87 $this->refinery->kindlyTo()->string()
88 );
89 }
90 return '';
91 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ fetchSortation()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::fetchSortation ( )

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 66 of file AbstractSearchStateHandlerImpl.php.

66 : Sortation
67 {
68 $sortation_string = '';
69 if ($this->http->wrapper()->query()->has(Param::SORTATION->value)) {
70 $sortation_string = $this->http->wrapper()->query()->retrieve(
71 Param::SORTATION->value,
72 $this->refinery->kindlyTo()->string()
73 );
74 }
75 return Sortation::tryFrom($sortation_string) ?? Sortation::RELEVANCE_DESC;
76 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ loadFilterToCache()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::loadFilterToCache ( ilSearchFilterGUI  $filter,
ilUserSearchCache  $cache 
)
abstract

◆ resetMaxPage()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::resetMaxPage ( )

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 44 of file AbstractSearchStateHandlerImpl.php.

44 : void
45 {
46 ilSession::clear(Param::MAX_PAGE->value);
47 }
static clear(string $a_var)

References ilSession\clear().

+ Here is the call graph for this function:

◆ updateMaxPage()

ILIAS\Search\GUI\AbstractSearchStateHandlerImpl::updateMaxPage ( int  $max_page)

Implements ILIAS\Search\GUI\SearchStateHandler.

Definition at line 49 of file AbstractSearchStateHandlerImpl.php.

49 : void
50 {
51 ilSession::set(Param::MAX_PAGE->value, $max_page > 0 ? (string) $max_page : '1');
52 }
static set(string $a_var, $a_val)
Set a value.

References ilSession\set().

+ Here is the call graph for this function:

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