ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMailForm.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Search/classes/class.ilSearchSettings.php';
5 include_once './Services/Mail/classes/class.ilMailAutoCompleteRecipientResult.php';
6 include_once './Services/Mail/classes/class.ilMailAutoCompleteSentMailsRecipientsProvider.php';
7 include_once './Services/Mail/classes/class.ilMailAutoCompleteAddressbookLoginProvider.php';
8 include_once './Services/Mail/classes/class.ilMailAutoCompleteAddressbookEmailProvider.php';
9 include_once './Services/Mail/classes/class.ilMailAutoCompleteUserProvider.php';
10 include_once './Services/Mail/classes/class.ilMailAutoCompleteSearch.php';
11 
17 {
28  public function getRecipientAsync($quoted_term, $term, $search_recipients = true)
29  {
30  if($search_recipients)
31  {
32  $sent_mails_recipient_provider = new ilMailAutoCompleteSentMailsRecipientsProvider($quoted_term, $term);
33  }
34  $address_book_login = new ilMailAutoCompleteAddressbookLoginProvider($quoted_term, $term);
35  $address_book_email = new ilMailAutoCompleteAddressbookEmailProvider($quoted_term, $term);
36  $user = new ilMailAutoCompleteUserProvider($quoted_term, $term);
37 
38  $result = new ilMailAutocompleteRecipientResult(
39  isset($_GET['fetchall']) && (int)$_GET['fetchall'] ?
40  ilMailAutocompleteRecipientResult::MODE_FETCH_ALL :
41  ilMailAutocompleteRecipientResult::MODE_STOP_ON_MAX_ENTRIES
42  );
43 
44  $result_fetcher = new ilMailAutoCompleteSearch($result);
45  if($search_recipients)
46  {
47  $result_fetcher->addProvider($sent_mails_recipient_provider);
48  }
49  $result_fetcher->addProvider($address_book_login);
50  $result_fetcher->addProvider($address_book_email);
51  $result_fetcher->addProvider($user);
52  $result_fetcher->search();
53 
54  return $result->getItems();
55  }
56 }
$result
$_GET["client_id"]
Class ilMailAutoCompleteSearch.
Class ilMailAutoCompleteUserProvider.
getRecipientAsync($quoted_term, $term, $search_recipients=true)
Called by class ilMailFormGUI.