ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4require_once 'Services/Awareness/classes/class.ilAwarenessUserProvider.php';
5
12{
17 public function getProviderId()
18 {
19 return 'contact_requests';
20 }
21
26 public function getTitle()
27 {
28 $this->lng->loadLanguageModule('contact');
29 return $this->lng->txt('contact_awrn_ap_contacts');
30 }
31
36 public function getInfo()
37 {
38 $this->lng->loadLanguageModule('contact');
39 return $this->lng->txt('contact_awrn_ap_contacts_info');
40 }
41
46 public function getInitialUserSet()
47 {
51 global $ilUser;
52
53 if($ilUser->isAnonymous())
54 {
55 return array();
56 }
57
58 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
59 if(!ilBuddySystem::getInstance()->isEnabled())
60 {
61 return array();
62 }
63
64 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
65 $buddylist = ilBuddyList::getInstanceByGlobalUser();
66 return $buddylist->getLinkedRelations()->getKeys();
67 }
68}
getTitle()
Provider title (used in awareness overlay and in administration settings)
getInfo()
Provider info (used in administration settings)
A class that provides a collection of users for the awareness tool.
getInitialUserSet()
Get initial set of users.
global $ilUser
Definition: imgupload.php:15