ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\User\Search\EndpointGUI Class Reference
+ Collaboration diagram for ILIAS\User\Search\EndpointGUI:

Public Member Functions

 __construct (private readonly FieldConfigurationRepository $field_configuration_repository, private readonly ProfileDataRepository $profile_data_repository, private readonly SettingsDataRepository $settings_data_repository, private readonly \ilObjUser $current_user, private readonly HttpService $http, private readonly Refinery $refinery, private readonly \ilCtrl $ctrl, private readonly DataFactory $data_factory, private readonly EndpointConfigurator $endpoint_configurator)
 
 acquireBuilderAndToken ()
 
 getSuggestionsStartAfter ()
 
 executeCommand ()
 

Private Member Functions

 buildQueryStringTransformation ()
 

Private Attributes

const array NAMESPACE = ['u', 's']
 
const string SEARCH_TERM_TOKEN = 't'
 
const int SUGGESTIONS_START_AFTER = 3
 

Detailed Description

Definition at line 32 of file class.EndpointGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\User\Search\EndpointGUI::__construct ( private readonly FieldConfigurationRepository  $field_configuration_repository,
private readonly ProfileDataRepository  $profile_data_repository,
private readonly SettingsDataRepository  $settings_data_repository,
private readonly \ilObjUser  $current_user,
private readonly HttpService  $http,
private readonly Refinery  $refinery,
private readonly \ilCtrl  $ctrl,
private readonly DataFactory  $data_factory,
private readonly EndpointConfigurator  $endpoint_configurator 
)

Definition at line 38 of file class.EndpointGUI.php.

48 {
49 }

Member Function Documentation

◆ acquireBuilderAndToken()

ILIAS\User\Search\EndpointGUI::acquireBuilderAndToken ( )
Returns
array{0: \ILIAS\UI\URLBuilder, 1: \ILIAS\UI\URLBuilderToken}

Definition at line 54 of file class.EndpointGUI.php.

54 : array
55 {
56 return (new URLBuilder(
57 $this->data_factory->uri(
58 ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTargetByClass(
59 array_merge(
60 $this->endpoint_configurator->getParentClassPath(),
61 [self::class]
62 )
63 )
64 )
65 ))->acquireParameter(self::NAMESPACE, self::SEARCH_TERM_TOKEN);
66 }

◆ buildQueryStringTransformation()

ILIAS\User\Search\EndpointGUI::buildQueryStringTransformation ( )
private

Definition at line 126 of file class.EndpointGUI.php.

126 : \Closure
127 {
128 return function ($parameter): AutocompleteQuery {
129 return new AutocompleteQuery(
131 $this->refinery->kindlyTo()->string()->transform($parameter)
132 );
133 };
134 }

References ILIAS\User\Search\EndpointGUI\getSuggestionsStartAfter(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ executeCommand()

ILIAS\User\Search\EndpointGUI::executeCommand ( )

Definition at line 73 of file class.EndpointGUI.php.

73 : void
74 {
75 $this->http->saveResponse(
76 $this->http->response()->withBody(
77 Streams::ofString($this->buildResponse())
78 )
79 );
80 $this->http->sendResponse();
81 $this->http->close();
82 }
static ofString(string $string)
Creates a new stream with an initial value.
Definition: Streams.php:41
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http(), and ILIAS\Filesystem\Stream\Streams\ofString().

+ Here is the call graph for this function:

◆ getSuggestionsStartAfter()

ILIAS\User\Search\EndpointGUI::getSuggestionsStartAfter ( )

Definition at line 68 of file class.EndpointGUI.php.

68 : int
69 {
71 }

References ILIAS\User\Search\EndpointGUI\SUGGESTIONS_START_AFTER.

Referenced by ILIAS\User\Search\EndpointGUI\buildQueryStringTransformation().

+ Here is the caller graph for this function:

Field Documentation

◆ NAMESPACE

const array ILIAS\User\Search\EndpointGUI::NAMESPACE = ['u', 's']
private

Definition at line 34 of file class.EndpointGUI.php.

◆ SEARCH_TERM_TOKEN

const string ILIAS\User\Search\EndpointGUI::SEARCH_TERM_TOKEN = 't'
private

Definition at line 35 of file class.EndpointGUI.php.

◆ SUGGESTIONS_START_AFTER

const int ILIAS\User\Search\EndpointGUI::SUGGESTIONS_START_AFTER = 3
private

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