ILIAS  release_8 Revision v8.24
ilBuddySystem Class Reference

Class ilBuddySystem. More...

+ Collaboration diagram for ilBuddySystem:

Public Member Functions

 setSetting (string $keyword, string $value)
 
 getSetting (string $keyword, ?string $default=null)
 
 isEnabled ()
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 __construct ()
 

Protected Attributes

ilSetting $settings
 
ilObjUser $user
 

Static Protected Attributes

static self $instance = null
 
static bool $isEnabled = null
 

Detailed Description

Class ilBuddySystem.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 25 of file class.ilBuddySystem.php.

Constructor & Destructor Documentation

◆ __construct()

ilBuddySystem::__construct ( )
protected

Definition at line 33 of file class.ilBuddySystem.php.

34 {
35 global $DIC;
36
37 $this->settings = new ilSetting('buddysystem');
38 $this->user = $DIC['ilUser'];
39 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28

References $DIC, ILIAS\Repository\settings(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilBuddySystem::getInstance ( )
static

Definition at line 41 of file class.ilBuddySystem.php.

41 : self
42 {
43 if (!(self::$instance instanceof self)) {
44 self::$instance = new self();
45 }
46
47 return self::$instance;
48 }
static self $instance

References $instance.

Referenced by ilRepositoryUserResultTableGUI\__construct(), ilMailSearchObjectMembershipsTableGUI\__construct(), ilUsersGalleryGUI\addActionSection(), ilProfileChecklistStatus\anyVisibilitySettings(), ilContactGUI\applyContactsTableFilter(), ilContactGUI\changeContactsView(), ilContactUserActionProvider\collectActionsForTargetUser(), ilContactGUI\executeCommand(), ilMailingListsGUI\executeCommand(), ilMailSearchObjectGUI\executeCommand(), ilDashboardGUI\executeCommand(), ilMailSearchObjectMembershipsTableGUI\fillRow(), ilRepositoryUserResultTableGUI\fillRow(), ilBuddySystemLinkButton\getHtml(), ilAwarenessUserProviderApprovedContacts\getInitialUserSet(), ilAwarenessUserProviderContactRequests\getInitialUserSet(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), ILIAS\Contact\Provider\ContactMainBarProvider\getStaticSubItems(), ilProfileChecklistStatus\getStatusDetails(), ilBuddySystemGUI\initializeFrontend(), ilUserPrivacySettingsGUI\isContactSettingVisible(), ilContactGUI\resetContactsTableFilter(), ilObjContactAdministrationGUI\saveConfigurationForm(), ilObjContactAdministrationGUI\showConfigurationForm(), ilContactGUI\showContactRequests(), ilContactGUI\showContacts(), and ilContactGUI\showSubTabs().

+ Here is the caller graph for this function:

◆ getSetting()

ilBuddySystem::getSetting ( string  $keyword,
?string  $default = null 
)
Parameters
string$keyword
string | null$default
Returns
string|null

Definition at line 64 of file class.ilBuddySystem.php.

64 : ?string
65 {
66 return $this->settings->get($keyword, $default);
67 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ isEnabled()

ilBuddySystem::isEnabled ( )

Definition at line 69 of file class.ilBuddySystem.php.

69 : bool
70 {
71 if (self::$isEnabled !== null) {
72 return self::$isEnabled;
73 }
74
75 if ($this->user->isAnonymous()) {
76 self::$isEnabled = false;
77 return false;
78 }
79
80 self::$isEnabled = (bool) $this->settings->get('enabled', '0');
81 return self::$isEnabled;
82 }
static bool $isEnabled

References $isEnabled, ILIAS\Repository\settings(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ setSetting()

ilBuddySystem::setSetting ( string  $keyword,
string  $value 
)
Parameters
string$keyword
string$value

Definition at line 54 of file class.ilBuddySystem.php.

54 : void
55 {
56 $this->settings->set($keyword, $value);
57 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

Field Documentation

◆ $instance

self ilBuddySystem::$instance = null
staticprotected

Definition at line 27 of file class.ilBuddySystem.php.

Referenced by getInstance().

◆ $isEnabled

bool ilBuddySystem::$isEnabled = null
staticprotected

Definition at line 28 of file class.ilBuddySystem.php.

Referenced by isEnabled().

◆ $settings

ilSetting ilBuddySystem::$settings
protected

Definition at line 30 of file class.ilBuddySystem.php.

◆ $user

ilObjUser ilBuddySystem::$user
protected

Definition at line 31 of file class.ilBuddySystem.php.


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