ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilAwarenessUserProviderApprovedContacts.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
30 {
31  protected ilLanguage $lng;
32  protected ilObjUser $user;
33 
34  public function __construct(Container $DIC)
35  {
36  $this->user = $DIC->user();
37  $this->lng = $DIC->language();
38  }
39 
43  public function getProviderId(): string
44  {
45  return 'contact_requests';
46  }
47 
51  public function getTitle(): string
52  {
53  $this->lng->loadLanguageModule('contact');
54  return $this->lng->txt('contact_awrn_ap_contacts');
55  }
56 
60  public function getInfo(): string
61  {
62  $this->lng->loadLanguageModule('contact');
63  return $this->lng->txt('contact_awrn_ap_contacts_info');
64  }
65 
71  public function getInitialUserSet(?array $user_ids = null): array
72  {
73  if ($this->user->isAnonymous()) {
74  return [];
75  }
76 
77  if (!ilBuddySystem::getInstance()->isEnabled()) {
78  return [];
79  }
80 
81  return ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()->getKeys();
82  }
83 
84  public function isHighlighted(): bool
85  {
86  return false;
87  }
88 }
user()
Get the current user.
Definition: Container.php:71
getInitialUserSet(?array $user_ids=null)
Get initial set of users.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
language()
Get interface to the i18n service.
Definition: Container.php:95
static getInstanceByGlobalUser(?ilObjUser $user=null)