ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_once './Services/Search/classes/class.ilSearchSettings.php';
5include_once './Services/Mail/classes/class.ilMailAutoCompleteRecipientResult.php';
6include_once './Services/Mail/classes/class.ilMailAutoCompleteSentMailsRecipientsProvider.php';
7include_once './Services/Mail/classes/class.ilMailAutoCompleteUserProvider.php';
8include_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 {
31 $sent_mails_recipient_provider = new ilMailAutoCompleteSentMailsRecipientsProvider($quoted_term, $term);
32 }
33 $approved_contacts = new ilMailAutoCompleteBuddyRecipientsProvider($quoted_term, $term);
34 $user = new ilMailAutoCompleteUserProvider($quoted_term, $term);
35
36 $result = new ilMailAutocompleteRecipientResult(
37 isset($_GET['fetchall']) && (int)$_GET['fetchall'] ?
38 ilMailAutocompleteRecipientResult::MODE_FETCH_ALL :
39 ilMailAutocompleteRecipientResult::MODE_STOP_ON_MAX_ENTRIES
40 );
41
42 $result_fetcher = new ilMailAutoCompleteSearch($result);
43 if($search_recipients)
44 {
45 $result_fetcher->addProvider($sent_mails_recipient_provider);
46 }
47 $result_fetcher->addProvider($approved_contacts);
48 $result_fetcher->addProvider($user);
49 $result_fetcher->search();
50
51 return $result->getItems();
52 }
53}
$result
$_GET["client_id"]
Class ilMailAutoCompleteSearch.
Class ilMailAutoCompleteUserProvider.
getRecipientAsync($quoted_term, $term, $search_recipients=true)
Called by class ilMailFormGUI.