ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.ilMailAutoCompleteUserProvider.php';
8 include_once './Services/Mail/classes/class.ilMailAutoCompleteSearch.php';
9 
15 {
26  public function getRecipientAsync($quoted_term, $term, $search_recipients = true)
27  {
28  require_once 'Services/Contact/BuddySystem/classes/class.ilMailAutoCompleteBuddyRecipientsProvider.php';
29  if ($search_recipients) {
30  $sent_mails_recipient_provider = new ilMailAutoCompleteSentMailsRecipientsProvider($quoted_term, $term);
31  }
32  $approved_contacts = new ilMailAutoCompleteBuddyRecipientsProvider($quoted_term, $term);
33  $user = new ilMailAutoCompleteUserProvider($quoted_term, $term);
34 
35  $result = new ilMailAutocompleteRecipientResult(
36  isset($_GET['fetchall']) && (int) $_GET['fetchall'] ?
37  ilMailAutocompleteRecipientResult::MODE_FETCH_ALL :
38  ilMailAutocompleteRecipientResult::MODE_STOP_ON_MAX_ENTRIES
39  );
40 
41  $result_fetcher = new ilMailAutoCompleteSearch($result);
42  if ($search_recipients) {
43  $result_fetcher->addProvider($sent_mails_recipient_provider);
44  }
45  $result_fetcher->addProvider($approved_contacts);
46  $result_fetcher->addProvider($user);
47  $result_fetcher->search();
48 
49  return $result->getItems();
50  }
51 }
$result
$_GET["client_id"]
Class ilMailAutoCompleteSearch.
$user
Definition: migrateto20.php:57
Class ilMailAutoCompleteUserProvider.
getRecipientAsync($quoted_term, $term, $search_recipients=true)
Called by class ilMailFormGUI.