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

Public Member Functions

 __construct (private readonly UIFactory $ui_factory, private readonly EndpointFactory $endpoint_factory)
 
 getInput (string $label, EndpointConfigurator $endpoint_configurator, ?string $byline=null)
 
 getEndpointGUI (EndpointConfigurator $endpoint_configurator)
 
 getDefaultEndpointConfigurator (array $parent_class_path)
 

Detailed Description

Definition at line 26 of file Search.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\User\Search\Search::__construct ( private readonly UIFactory  $ui_factory,
private readonly EndpointFactory  $endpoint_factory 
)

Definition at line 28 of file Search.php.

31 {
32 }

Member Function Documentation

◆ getDefaultEndpointConfigurator()

ILIAS\User\Search\Search::getDefaultEndpointConfigurator ( array  $parent_class_path)
Parameters
list<string>$parent_class_path Please Provide the full class_path to reach this class and make sure that the path contains a check, if the current user is actually allowed to search here. The only check that can and will happen once the Endpoint is called is that a user is actually logged in (no anonymous user).
Returns
\ILIAS\User\Search\Endpoint This endpoints returns information from the user table by searching the fields for login, lastname, firstname, email, and second_email depending on the searchability of these fields set in Administration and the visibility of the fields set by the user.

Definition at line 73 of file Search.php.

76 return new DefaultEndpointConfigurator(
77 $parent_class_path
78 );
79 }

◆ getEndpointGUI()

ILIAS\User\Search\Search::getEndpointGUI ( EndpointConfigurator  $endpoint_configurator)
Parameters
$endpoint_configuratorYou can get a DefaultEndpointConfigurator from \ILIAS\User\Search\Search::getDefaultEndpointConfigurator().

Definition at line 54 of file Search.php.

56 : EndpointGUI {
57 return $this->endpoint_factory->getEndpointGUI($endpoint_configurator);
58 }

◆ getInput()

ILIAS\User\Search\Search::getInput ( string  $label,
EndpointConfigurator  $endpoint_configurator,
?string  $byline = null 
)
Parameters
$endpoint_configuratorYou can get a DefaultEndpointConfigurator from \ILIAS\User\Search\Search::getDefaultEndpointConfigurator().

Definition at line 38 of file Search.php.

42 : Tag {
43 $endpoint = $this->getEndpointGUI($endpoint_configurator);
44
45 return $this->ui_factory->input()->field()->tag($label, [], $byline)
46 ->withSuggestionsStartAfter($endpoint->getSuggestionsStartAfter())
47 ->withAsyncAutocomplete(...$endpoint->acquireBuilderAndToken());
48 }
getEndpointGUI(EndpointConfigurator $endpoint_configurator)
Definition: Search.php:54

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