ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ProviderAllUsers.php
Go to the documentation of this file.
1<?php
2
19namespace ILIAS\Awareness\User;
20
22
27class ProviderAllUsers implements Provider
28{
29 protected \ilLanguage $lng;
30 protected \ilDBInterface $db;
31
32 public function __construct(Container $DIC)
33 {
34 $this->db = $DIC->database();
35 $this->lng = $DIC->language();
36 }
37
38 public function getProviderId(): string
39 {
40 return "user_all";
41 }
42
47 public function getTitle(): string
48 {
49 $this->lng->loadLanguageModule("user");
50 return $this->lng->txt("user_awrn_all_users");
51 }
52
57 public function getInfo(): string
58 {
59 $this->lng->loadLanguageModule("user");
60 return $this->lng->txt("user_awrn_all_users_info");
61 }
62
68 public function getInitialUserSet(?array $user_ids = null): array
69 {
71
72 $ub = array();
73 // all online users
74 if (!is_null($user_ids)) {
75 return $user_ids;
76 } else { // all users
77 $set = $ilDB->query("SELECT usr_id FROM usr_data ");
78 while ($rec = $ilDB->fetchAssoc($set)) {
79 $ub[] = (int) $rec["usr_id"];
80 }
81 }
82 return $ub;
83 }
84
85 public function isHighlighted(): bool
86 {
87 return false;
88 }
89}
getTitle()
Provider title (used in awareness overlay and in administration settings)
getInitialUserSet(?array $user_ids=null)
Get initial set of users.
getInfo()
Provider info (used in administration settings)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
language()
Get interface to the i18n service.
Definition: Container.php:95
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26