ILIAS  trunk Revision v12.0_alpha-1541-g23eaa5e013d
ILIAS\Mail\RecipientSearch\UserSearchEndpointConfigurator Class Reference
+ Inheritance diagram for ILIAS\Mail\RecipientSearch\UserSearchEndpointConfigurator:
+ Collaboration diagram for ILIAS\Mail\RecipientSearch\UserSearchEndpointConfigurator:

Public Member Functions

 getParentClassPath ()
 
 getAdditionalAnswerElements (\ilObjUser $current_user, AutocompleteQuery $autocomplete_query)
 
 getParentClassPath ()
 
 getAdditionalAnswerElements (\ilObjUser $current_user, AutocompleteQuery $autocomplete_query)
 

Detailed Description

Definition at line 26 of file UserSearchEndpointConfigurator.php.

Member Function Documentation

◆ getAdditionalAnswerElements()

ILIAS\Mail\RecipientSearch\UserSearchEndpointConfigurator::getAdditionalAnswerElements ( \ilObjUser  $current_user,
AutocompleteQuery  $autocomplete_query 
)
Returns
list<AutocompleteItem> Items that should be added to the list the user can select from.

Implements ILIAS\User\Search\EndpointConfigurator.

Definition at line 36 of file UserSearchEndpointConfigurator.php.

39 : array {
40 // #14768
41 $term = \ilUtil::stripSlashes($autocomplete_query->getUnprocessedSearchTerm());
42 $quoted_term = '%' . str_replace(
43 ['%', '_'],
44 ['\%', '\_'],
45 $term
46 ) . '%';
47
48 $result = new UserSearchAutocompleteItemResult($autocomplete_query);
49
50 $search = new Search($result);
51 $search->addProvider(
52 new SentMailsBasedProvider($quoted_term, $term)
53 );
54 $search->addProvider(
55 new \ILIAS\Contact\BuddySystem\MailRecipientSearch\MailRecipientSearchProvider($quoted_term, $term)
56 );
57 $search->search();
58
59 return $result->getItems();
60 }
getUnprocessedSearchTerm()
The returned search term might contain wild cards or any other input.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

◆ getParentClassPath()

ILIAS\Mail\RecipientSearch\UserSearchEndpointConfigurator::getParentClassPath ( )
Returns
list<string> MUST return an array containing all class names in the path to be prepended to the EndpointGUI to build the URL with {
See also
\ilCtrlInterface}

Implements ILIAS\User\Search\EndpointConfigurator.

Definition at line 28 of file UserSearchEndpointConfigurator.php.

28 : array
29 {
30 return [
31 \ilMailGUI::class,
32 \ilMailFormGUI::class
33 ];
34 }

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