ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilAwarenessUserProviderApprovedContacts.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10{
12 protected $user;
13
17 public function __construct()
18 {
19 global $DIC;
20
22
23 $this->user = $DIC['ilUser'];
24 }
25
29 public function getProviderId()
30 {
31 return 'contact_requests';
32 }
33
37 public function getTitle()
38 {
39 $this->lng->loadLanguageModule('contact');
40 return $this->lng->txt('contact_awrn_ap_contacts');
41 }
42
46 public function getInfo()
47 {
48 $this->lng->loadLanguageModule('contact');
49 return $this->lng->txt('contact_awrn_ap_contacts_info');
50 }
51
55 public function getInitialUserSet()
56 {
57 if ($this->user->isAnonymous()) {
58 return [];
59 }
60
61 if (!ilBuddySystem::getInstance()->isEnabled()) {
62 return [];
63 }
64
65 return ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()->getKeys();
66 }
67}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
__construct()
ilAwarenessUserProviderApprovedContacts constructor.
A class that provides a collection of users for the awareness tool.
static getInstanceByGlobalUser()
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46