ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilAwarenessUserProviderApprovedContacts.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Awareness/classes/class.ilAwarenessUserProvider.php';
5 
12 {
16  protected $user;
17 
21  public function __construct()
22  {
23  global $DIC;
24 
25  parent::__construct();
26 
27  $this->user = $DIC['ilUser'];
28  }
29 
34  public function getProviderId()
35  {
36  return 'contact_requests';
37  }
38 
43  public function getTitle()
44  {
45  $this->lng->loadLanguageModule('contact');
46  return $this->lng->txt('contact_awrn_ap_contacts');
47  }
48 
53  public function getInfo()
54  {
55  $this->lng->loadLanguageModule('contact');
56  return $this->lng->txt('contact_awrn_ap_contacts_info');
57  }
58 
63  public function getInitialUserSet()
64  {
65  if($this->user->isAnonymous())
66  {
67  return array();
68  }
69 
70  require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
71  if(!ilBuddySystem::getInstance()->isEnabled())
72  {
73  return array();
74  }
75 
76  require_once 'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
78  return $buddylist->getLinkedRelations()->getKeys();
79  }
80 }
getInfo()
Provider info (used in administration settings)
static getInstanceByGlobalUser()
getTitle()
Provider title (used in awareness overlay and in administration settings)
A class that provides a collection of users for the awareness tool.
user()
Definition: user.php:4
__construct()
ilAwarenessUserProviderApprovedContacts constructor.
Create styles array
The data for the language used.
global $DIC