4 require_once
'Services/Search/classes/class.ilSearchSettings.php';
19 protected $mode = self::MODE_STOP_ON_MAX_ENTRIES;
30 $this->allow_smtp = $DIC->rbac()->system()->checkAccess(
'smtp_mail', MAIL_SETTINGS_ID);
31 $this->user_id = $DIC->user()->getId();
34 $this->result[
'items'] =
array();
35 $this->result[
'hasMoreResults'] =
false;
46 if (!in_array(
$mode,
array(self::MODE_FETCH_ALL, self::MODE_STOP_ON_MAX_ENTRIES))) {
58 $this->mode == self::MODE_STOP_ON_MAX_ENTRIES &&
59 $this->max_entries >= 0 && count($this->result[
'items']) >= $this->max_entries
63 $this->mode == self::MODE_FETCH_ALL &&
64 count($this->result[
'items']) >= self::MAX_RESULT_ENTRIES
76 public function addResult($login, $firstname, $lastname)
78 if (!isset($this->handled_recipients[$login])) {
80 $recipient[
'value'] = $login;
83 if ($firstname && $lastname) {
84 $label .=
" [" . $firstname .
", " . $lastname .
"]";
86 $recipient[
'label'] = $label;
88 $this->result[
'items'][] = $recipient;
89 $this->handled_recipients[$login] = 1;
106 return (
int) count($this->result[
'items']);
Class ilMailAutoCompleteRecipientResult.
const MODE_STOP_ON_MAX_ENTRIES
Create styles array
The data for the language used.
addResult($login, $firstname, $lastname)