ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 }
ILIAS Setting Class.
global $DIC
Definition: shib_login.php:26

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 ilMailSearchObjectMembershipsTableGUI\__construct(), ilRepositoryUserResultTableGUI\__construct(), ILIAS\User\Profile\ChecklistStatus\anyVisibilitySettings(), ILIAS\User\Profile\ChecklistStatus\buildStatusArrayForVisibilityOnSuccess(), ilContactGUI\changeContactsView(), ilContactUserActionProvider\collectActionsForTargetUser(), ilContactGUI\executeCommand(), ilMailingListsGUI\executeCommand(), ilMailSearchObjectGUI\executeCommand(), ilDashboardGUI\executeCommand(), ilMailSearchObjectMembershipsTableGUI\fillRow(), ilRepositoryUserResultTableGUI\fillRow(), ilUsersGalleryGUI\getActionsSection(), ilObjContactAdministrationGUI\getConfigurationForm(), ilBuddySystemLinkButton\getHtml(), ilAwarenessUserProviderApprovedContacts\getInitialUserSet(), ilAwarenessUserProviderContactRequests\getInitialUserSet(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), ILIAS\Contact\Provider\ContactMainBarProvider\getStaticSubItems(), ilTutorialSupportBlockGUI\hasContactEnabled(), ilBuddySystemGUI\initializeFrontend(), ilObjContactAdministrationGUI\saveConfigurationForm(), ilContactGUI\showContacts(), and ilContactGUI\showSubTabs().

+ Here is the caller graph for this function:

◆ getSetting()

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

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

55 : ?string
56 {
57 return $this->settings->get($keyword, $default);
58 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ isEnabled()

ilBuddySystem::isEnabled ( )

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

60 : bool
61 {
62 if (self::$isEnabled !== null) {
63 return self::$isEnabled;
64 }
65
66 if ($this->user->isAnonymous()) {
67 self::$isEnabled = false;
68 return false;
69 }
70
71 self::$isEnabled = (bool) $this->settings->get('enabled', '0');
72 return self::$isEnabled;
73 }
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 
)

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

50 : void
51 {
52 $this->settings->set($keyword, $value);
53 }

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: