◆ __construct()
ilMailAutoCompleteRecipientResult::__construct |
( |
int |
$mode | ) |
|
◆ addResult()
ilMailAutoCompleteRecipientResult::addResult |
( |
string |
$login, |
|
|
string |
$firstname, |
|
|
string |
$lastname |
|
) |
| |
Definition at line 76 of file class.ilMailAutoCompleteRecipientResult.php.
76 : void
77 {
78 if ($login !== '' && !isset($this->handled_recipients[$login])) {
79 $recipient = [];
80 $recipient['value'] = $login;
81
82 $label = $login;
83 if ($firstname && $lastname) {
84 $label .= " [" . $firstname . ", " . $lastname . "]";
85 }
86 $recipient['label'] = $label;
87
88 $this->result['items'][] = $recipient;
89 $this->handled_recipients[$login] = 1;
90 }
91 }
◆ getItems()
ilMailAutoCompleteRecipientResult::getItems |
( |
| ) |
|
◆ initMode()
ilMailAutoCompleteRecipientResult::initMode |
( |
int |
$mode | ) |
|
|
protected |
◆ isResultAddable()
ilMailAutoCompleteRecipientResult::isResultAddable |
( |
| ) |
|
Definition at line 61 of file class.ilMailAutoCompleteRecipientResult.php.
61 : bool
62 {
63 if ($this->mode === self::MODE_STOP_ON_MAX_ENTRIES &&
64 $this->max_entries >= 0 && count($this->result['items']) >= $this->max_entries) {
65 return false;
66 }
67
68 if ($this->mode === self::MODE_FETCH_ALL &&
69 count($this->result['items']) >= self::MAX_RESULT_ENTRIES) {
70 return false;
71 }
72
73 return true;
74 }
◆ numItems()
ilMailAutoCompleteRecipientResult::numItems |
( |
| ) |
|
◆ $allow_smtp
bool ilMailAutoCompleteRecipientResult::$allow_smtp |
|
protected |
◆ $handled_recipients
array ilMailAutoCompleteRecipientResult::$handled_recipients = [] |
|
protected |
◆ $max_entries
int ilMailAutoCompleteRecipientResult::$max_entries |
|
protected |
◆ $mode
int ilMailAutoCompleteRecipientResult::$mode = self::MODE_STOP_ON_MAX_ENTRIES |
|
protected |
◆ $result
array ilMailAutoCompleteRecipientResult::$result |
◆ $user_id
int ilMailAutoCompleteRecipientResult::$user_id |
|
protected |
◆ MAX_RESULT_ENTRIES
final const int ilMailAutoCompleteRecipientResult::MAX_RESULT_ENTRIES = 1000 |
◆ MODE_FETCH_ALL
final const int ilMailAutoCompleteRecipientResult::MODE_FETCH_ALL = 2 |
◆ MODE_STOP_ON_MAX_ENTRIES
final const int ilMailAutoCompleteRecipientResult::MODE_STOP_ON_MAX_ENTRIES = 1 |
The documentation for this class was generated from the following file: