Class ilMailAutoCompleteRecipientResult.
More...
◆ addResult()
ilMailAutoCompleteRecipientResult::addResult |
( |
|
$login, |
|
|
|
$firstname, |
|
|
|
$lastname |
|
) |
| |
- Parameters
-
string | $login | |
string | $firstname | |
string | $lastname | |
Definition at line 84 of file class.ilMailAutoCompleteRecipientResult.php.
85 {
86 if(!isset($this->handled_recipients[$login]))
87 {
88 $recipient = array();
89 $recipient['value'] = $login;
90
91 $label = $login;
92 if($firstname && $lastname)
93 {
94 $label .= " [" . $firstname . ", " . $lastname . "]";
95 }
96 $recipient['label'] = $label;
97
98 $this->result['items'][] = $recipient;
99 $this->handled_recipients[$login] = 1;
100 }
101 }
◆ getItems()
ilMailAutoCompleteRecipientResult::getItems |
( |
| ) |
|
◆ initMode()
ilMailAutoCompleteRecipientResult::initMode |
( |
|
$mode | ) |
|
|
protected |
- Parameters
-
- Exceptions
-
Definition at line 48 of file class.ilMailAutoCompleteRecipientResult.php.
49 {
50 if(!in_array(
$mode, array(self::MODE_FETCH_ALL, self::MODE_STOP_ON_MAX_ENTRIES)))
51 {
52 throw new InvalidArgumentException("Wrong mode passed!");
53 }
55 }
References $mode.
◆ isResultAddable()
ilMailAutoCompleteRecipientResult::isResultAddable |
( |
| ) |
|
- Returns
- bool
Definition at line 60 of file class.ilMailAutoCompleteRecipientResult.php.
61 {
62 if(
63 $this->mode == self::MODE_STOP_ON_MAX_ENTRIES &&
64 $this->max_entries >= 0 && count($this->result['items']) >= $this->max_entries
65 )
66 {
67 return false;
68 }
69 else if(
70 $this->mode == self::MODE_FETCH_ALL &&
71 count($this->result['items']) >= self::MAX_RESULT_ENTRIES
72 )
73 {
74 return false;
75 }
76 return true;
77 }
◆ numItems()
ilMailAutoCompleteRecipientResult::numItems |
( |
| ) |
|
◆ $allow_smtp
ilMailAutoCompleteRecipientResult::$allow_smtp = null |
|
protected |
◆ $handled_recipients
ilMailAutoCompleteRecipientResult::$handled_recipients = array() |
|
protected |
◆ $max_entries
ilMailAutoCompleteRecipientResult::$max_entries = null |
|
protected |
◆ $mode
ilMailAutoCompleteRecipientResult::$mode = self::MODE_STOP_ON_MAX_ENTRIES |
|
protected |
◆ $result
ilMailAutoCompleteRecipientResult::$result = array() |
◆ $user_id
ilMailAutoCompleteRecipientResult::$user_id = null |
|
protected |
◆ MAX_RESULT_ENTRIES
const ilMailAutoCompleteRecipientResult::MAX_RESULT_ENTRIES = 1000 |
◆ MODE_FETCH_ALL
const ilMailAutoCompleteRecipientResult::MODE_FETCH_ALL = 2 |
◆ MODE_STOP_ON_MAX_ENTRIES
const ilMailAutoCompleteRecipientResult::MODE_STOP_ON_MAX_ENTRIES = 1 |
The documentation for this class was generated from the following file: