ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAwarenessUserProviderApprovedContacts Class Reference

Class ilAwarenessUserProviderApprovedContacts. More...

+ Inheritance diagram for ilAwarenessUserProviderApprovedContacts:
+ Collaboration diagram for ilAwarenessUserProviderApprovedContacts:

Public Member Functions

 __construct (Container $DIC)
 
 getProviderId ()
 @inheritDoc More...
 
 getTitle ()
 @inheritDoc More...
 
 getInfo ()
 @inheritDoc More...
 
 getInitialUserSet (?array $user_ids=null)
 Get initial set of users. More...
 
 isHighlighted ()
 Is highlighted. More...
 
 getProviderId ()
 
 getTitle ()
 Provider title (used in awareness overlay and in administration settings) More...
 
 getInfo ()
 Provider info (used in administration settings) More...
 
 getInitialUserSet (?array $user_ids=null)
 Get initial set of users. More...
 
 isHighlighted ()
 Is highlighted. More...
 

Protected Attributes

ilLanguage $lng
 
ilObjUser $user
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAwarenessUserProviderApprovedContacts::__construct ( Container  $DIC)

Definition at line 34 of file class.ilAwarenessUserProviderApprovedContacts.php.

35 {
36 $this->user = $DIC->user();
37 $this->lng = $DIC->language();
38 }
user()
Get the current user.
Definition: Container.php:71
language()
Get interface to the i18n service.
Definition: Container.php:95

References ILIAS\DI\Container\language(), ILIAS\Repository\lng(), ILIAS\DI\Container\user(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInfo()

ilAwarenessUserProviderApprovedContacts::getInfo ( )

@inheritDoc

Implements ILIAS\Awareness\User\Provider.

Definition at line 60 of file class.ilAwarenessUserProviderApprovedContacts.php.

60 : string
61 {
62 $this->lng->loadLanguageModule('contact');
63 return $this->lng->txt('contact_awrn_ap_contacts_info');
64 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getInitialUserSet()

ilAwarenessUserProviderApprovedContacts::getInitialUserSet ( ?array  $user_ids = null)

Get initial set of users.

Parameters
?int[]$user_ids
Returns
int[] array of user IDs

Implements ILIAS\Awareness\User\Provider.

Definition at line 71 of file class.ilAwarenessUserProviderApprovedContacts.php.

71 : 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 }
static getInstanceByGlobalUser(?ilObjUser $user=null)

References ilBuddySystem\getInstance(), ilBuddyList\getInstanceByGlobalUser(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getProviderId()

ilAwarenessUserProviderApprovedContacts::getProviderId ( )

@inheritDoc

Implements ILIAS\Awareness\User\Provider.

Definition at line 43 of file class.ilAwarenessUserProviderApprovedContacts.php.

43 : string
44 {
45 return 'contact_requests';
46 }

◆ getTitle()

ilAwarenessUserProviderApprovedContacts::getTitle ( )

@inheritDoc

Implements ILIAS\Awareness\User\Provider.

Definition at line 51 of file class.ilAwarenessUserProviderApprovedContacts.php.

51 : string
52 {
53 $this->lng->loadLanguageModule('contact');
54 return $this->lng->txt('contact_awrn_ap_contacts');
55 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ isHighlighted()

ilAwarenessUserProviderApprovedContacts::isHighlighted ( )

Is highlighted.

Returns
bool return true, if user group should be highlighted (using extra highlighted number)

Implements ILIAS\Awareness\User\Provider.

Definition at line 84 of file class.ilAwarenessUserProviderApprovedContacts.php.

84 : bool
85 {
86 return false;
87 }

Field Documentation

◆ $lng

ilLanguage ilAwarenessUserProviderApprovedContacts::$lng
protected

◆ $user

ilObjUser ilAwarenessUserProviderApprovedContacts::$user
protected

The documentation for this class was generated from the following file: