ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ProviderCourseContacts.php
Go to the documentation of this file.
1<?php
2
19namespace 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)
getInfo()
Provider info (used in administration settings)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
user()
Get the current user.
Definition: Container.php:71
language()
Get interface to the i18n service.
Definition: Container.php:95
static _getAllSupportContactsOfUser(int $a_usr_id, string $a_type)
Get all support contacts for a user.
$c
Definition: deliver.php:25
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