ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ProviderCourseContacts.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\Awareness\User;
20 
22 
28 {
29  protected \ilObjUser $user;
30  protected \ilLanguage $lng;
31  protected \ilDBInterface $db;
32 
33  public function __construct(Container $DIC)
34  {
35  $this->db = $DIC->database();
36  $this->lng = $DIC->language();
37  $this->user = $DIC->user();
38  }
39 
44  public function getProviderId(): string
45  {
46  return "crs_contacts";
47  }
48 
53  public function getTitle(): string
54  {
55  $this->lng->loadLanguageModule("crs");
56  return $this->lng->txt("crs_awrn_support_contacts");
57  }
58 
63  public function getInfo(): string
64  {
65  $this->lng->loadLanguageModule("crs");
66  return $this->lng->txt("crs_awrn_support_contacts_info");
67  }
68 
74  public function getInitialUserSet(?array $user_ids = null): array
75  {
76  $ub = array();
77  $support_contacts = \ilParticipants::_getAllSupportContactsOfUser($this->user->getId(), "crs");
78  foreach ($support_contacts as $c) {
79  $ub[] = (int) $c["usr_id"];
80  }
81  return $ub;
82  }
83 
84  public function isHighlighted(): bool
85  {
86  return false;
87  }
88 }
getInitialUserSet(?array $user_ids=null)
Get initial set of users.
getTitle()
Provider title (used in awareness overlay and in administration settings)
$c
Definition: deliver.php:25
getInfo()
Provider info (used in administration settings)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _getAllSupportContactsOfUser(int $a_usr_id, string $a_type)
Get all support contacts for a user.
global $DIC
Definition: shib_login.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...