ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMailForm.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
33  public function getRecipientAsync(string $quotedTerm, string $term, bool $doRecipientSearch = true): array
34  {
35  global $DIC;
36 
37  $http = $DIC->http();
38  $refinery = $DIC->refinery();
39 
41  if (
42  $http->wrapper()->query()->has('fetchall') &&
43  $http->wrapper()->query()->retrieve('fetchall', $refinery->kindlyTo()->bool())
44  ) {
46  }
47 
48  $result = new ilMailAutoCompleteRecipientResult($mode);
49 
50  $search = new ilMailAutoCompleteSearch($result);
51  if ($doRecipientSearch) {
52  $search->addProvider(new ilMailAutoCompleteSentMailsRecipientsProvider($quotedTerm, $term));
53  }
54  $search->addProvider(new ilMailAutoCompleteBuddyRecipientsProvider($quotedTerm, $term));
55  if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) {
56  $search->addProvider(new ilMailAutoCompleteUserProvider($quotedTerm, $term));
57  }
58  $search->search();
59 
60  return $result->getItems();
61  }
62 }
Class ilMailAutoCompleteRecipientResult.
global $DIC
Definition: feed.php:28
getRecipientAsync(string $quotedTerm, string $term, bool $doRecipientSearch=true)
Class ilMailAutoCompleteSearch.
$http
Definition: raiseError.php:7
Class ilMailAutoCompleteUserProvider.
Refinery Factory $refinery