ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMailAutoCompleteSearch.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
27  protected array $providers = [];
28 
29  public function __construct(protected ilMailAutoCompleteRecipientResult $result)
30  {
31  }
32 
33  public function addProvider(Iterator $provider): void
34  {
35  $this->providers[] = $provider;
36  }
37 
38  public function search(): void
39  {
40  foreach ($this->providers as $provider) {
41  foreach ($provider as $row) {
42  if (!$this->result->isResultAddable()) {
43  $this->result->result['hasMoreResults'] = true;
44  break 2;
45  }
46  $this->result->addResult($row['login'], $row['firstname'], $row['lastname']);
47  }
48  }
49  }
50 }
Class ilMailAutoCompleteRecipientResult.
$provider
Definition: ltitoken.php:80
Class ilMailAutoCompleteSearch.
__construct(protected ilMailAutoCompleteRecipientResult $result)