ILIAS  release_8 Revision v8.23
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.

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

34  {
35  global $DIC;
36 
37  $this->settings = new ilSetting('buddysystem');
38  $this->user = $DIC['ilUser'];
39  }
global $DIC
Definition: feed.php:28
+ 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.

Referenced by ilMailSearchObjectMembershipsTableGUI\__construct(), ilRepositoryUserResultTableGUI\__construct(), ilUsersGalleryGUI\addActionSection(), ilProfileChecklistStatus\anyVisibilitySettings(), ilContactGUI\applyContactsTableFilter(), ilMailSearchObjectGUI\cancel(), ilContactGUI\changeContactsView(), ilContactUserActionProvider\collectActionsForTargetUser(), ilMailingListsGUI\executeCommand(), ilContactGUI\executeCommand(), ilDashboardGUI\executeCommand(), ilMailSearchObjectGUI\executeCommand(), ilMailSearchObjectMembershipsTableGUI\fillRow(), ilRepositoryUserResultTableGUI\fillRow(), ilBuddySystemLinkButton\getHtml(), ilAwarenessUserProviderContactRequests\getInitialUserSet(), ilAwarenessUserProviderApprovedContacts\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().

41  : self
42  {
43  if (!(self::$instance instanceof self)) {
44  self::$instance = new self();
45  }
46 
47  return self::$instance;
48  }
+ 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.

References ILIAS\Repository\settings().

64  : ?string
65  {
66  return $this->settings->get($keyword, $default);
67  }
+ Here is the call graph for this function:

◆ isEnabled()

ilBuddySystem::isEnabled ( )

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

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

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  }
+ 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.

References ILIAS\Repository\settings().

54  : void
55  {
56  $this->settings->set($keyword, $value);
57  }
+ 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.

◆ $isEnabled

bool ilBuddySystem::$isEnabled = null
staticprotected

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

◆ $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: