ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilAwarenessUserProviderContactRequests.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{
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_approved';
37 }
38
43 public function getTitle()
44 {
45 $this->lng->loadLanguageModule('contact');
46 return $this->lng->txt('contact_awrn_req_contacts');
47 }
48
53 public function getInfo()
54 {
55 $this->lng->loadLanguageModule('contact');
56 return $this->lng->txt('contact_awrn_req_contacts_info');
57 }
58
63 public function getInitialUserSet()
64 {
65 if ($this->user->isAnonymous()) {
66 return array();
67 }
68
69 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
70 if (!ilBuddySystem::getInstance()->isEnabled()) {
71 return array();
72 }
73
74 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
76 return $buddylist->getRequestRelationsForOwner()->getKeys();
77 }
78
84 public function isHighlighted()
85 {
86 return true;
87 }
88}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
getTitle()
Provider title (used in awareness overlay and in administration settings)
getInfo()
Provider info (used in administration settings)
__construct()
ilAwarenessUserProviderApprovedContacts constructor.
A class that provides a collection of users for the awareness tool.
static getInstanceByGlobalUser()
global $DIC
Definition: saml.php:7