ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMembershipNotifications Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilMembershipNotifications:

Public Member Functions

 __construct (int $a_ref_id)
 
 getMode ()
 
 switchMode (int $a_new_mode)
 
 getActiveUsers ()
 
 activateUser (int $a_user_id=null)
 
 deactivateUser (int $a_user_id=null)
 
 isCurrentUserActive ()
 
 canCurrentUserEdit ()
 
 cloneSettings (int $new_ref_id)
 

Static Public Member Functions

static isActive ()
 
static isActiveForRefId (int $ref_id)
 
static getActiveUsersforAllObjects ()
 Get active notifications for all objects. More...
 
static addToSettingsForm (int $a_ref_id, ?ilPropertyFormGUI $a_form=null, ?ilFormPropertyGUI $a_input=null)
 Add notification settings to form. More...
 
static importFromForm (int $a_ref_id, ?ilPropertyFormGUI $a_form=null)
 

Protected Member Functions

 read ()
 
 setMode (int $a_value)
 
 isValidMode (int $a_value)
 
 getParticipants ()
 
 getUser (int $a_user_id=null)
 
 toggleUser (bool $a_status, int $a_user_id=null)
 

Protected Attributes

const VALUE_OFF = 0
 
const VALUE_ON = 1
 
const VALUE_BLOCKED = 2
 
const MODE_SELF = 1
 
const MODE_ALL = 2
 
const MODE_ALL_BLOCKED = 3
 
const MODE_CUSTOM = 4
 
int $ref_id
 
int $mode
 
array $custom
 
ilParticipants $participants = null
 
ilSetting $setting
 
ilDBInterface $db
 
ilTree $tree
 
ilObjUser $user
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Membership notification settings

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 26 of file class.ilMembershipNotifications.php.

Constructor & Destructor Documentation

◆ __construct()

ilMembershipNotifications::__construct ( int  $a_ref_id)

Definition at line 46 of file class.ilMembershipNotifications.php.

References $DIC, ILIAS\UI\examples\Chart\Bar\Horizontal\custom(), read(), setMode(), and ILIAS\Repository\user().

47  {
48  global $DIC;
49 
50  $this->db = $DIC->database();
51  $this->ref_id = $a_ref_id;
52  $this->custom = [];
53  $this->setting = $DIC->settings();
54  $this->tree = $DIC->repositoryTree();
55  $this->user = $DIC->user();
56 
57  $this->setMode(self::MODE_SELF);
58  if ($this->ref_id !== 0) {
59  $this->read();
60  }
61  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ activateUser()

ilMembershipNotifications::activateUser ( int  $a_user_id = null)

Definition at line 246 of file class.ilMembershipNotifications.php.

References toggleUser().

246  : bool
247  {
248  return $this->toggleUser(true, $a_user_id);
249  }
toggleUser(bool $a_status, int $a_user_id=null)
+ Here is the call graph for this function:

◆ addToSettingsForm()

static ilMembershipNotifications::addToSettingsForm ( int  $a_ref_id,
?ilPropertyFormGUI  $a_form = null,
?ilFormPropertyGUI  $a_input = null 
)
static

Add notification settings to form.

PhpUndefinedVariableInspection

PhpUndefinedVariableInspection

Definition at line 411 of file class.ilMembershipNotifications.php.

References $DIC, $lng, ilSubEnabledFormPropertyGUI\addSubItem(), and ilFormPropertyGUI\setRequired().

Referenced by ilContainerNewsSettingsGUI\initForm(), and ilObjectServiceSettingsGUI\initServiceSettingsForm().

415  : void {
416  global $DIC;
417 
418  $lng = $DIC->language();
419 
420  if (self::isActive() &&
421  $a_ref_id) {
422  $lng->loadLanguageModule("membership");
423  $noti = new self($a_ref_id);
424 
425  $force_noti = new ilRadioGroupInputGUI($lng->txt("mem_force_notification"), "force_noti");
426  $force_noti->setRequired(true);
427  if ($a_form) {
428  $a_form->addItem($force_noti);
429  } else {
430  $a_input->addSubItem($force_noti);
431  }
432 
433  if ($noti->isValidMode(self::MODE_SELF)) {
434  $option = new ilRadioOption($lng->txt("mem_force_notification_mode_self"), (string) self::MODE_SELF);
435  $force_noti->addOption($option);
436  }
437  if ($noti->isValidMode(self::MODE_ALL_BLOCKED)) {
438  $option = new ilRadioOption(
439  $lng->txt("mem_force_notification_mode_blocked"),
440  (string) self::MODE_ALL_BLOCKED
441  );
442  $force_noti->addOption($option);
443 
444  if ($noti->isValidMode(self::MODE_ALL)) {
445  $changeable = new ilCheckboxInputGUI(
446  $lng->txt("mem_force_notification_mode_all_sub_blocked"),
447  "force_noti_allblk"
448  );
449  $option->addSubItem($changeable);
450  }
451  } elseif ($noti->isValidMode(self::MODE_ALL)) {
452  $option = new ilRadioOption($lng->txt("mem_force_notification_mode_all"), (string) self::MODE_ALL);
453  $force_noti->addOption($option);
454  }
455 
456  // set current mode
457  $current_mode = $noti->getMode();
458  $has_changeable_cb = ($noti->isValidMode(self::MODE_ALL_BLOCKED) &&
459  $noti->isValidMode(self::MODE_ALL));
460  if (!$has_changeable_cb) {
461  $force_noti->setValue((string) $current_mode);
462  } else {
463  switch ($current_mode) {
464  case self::MODE_SELF:
465  $force_noti->setValue((string) $current_mode);
467  $changeable->setChecked(true); // checked as "default" on selection of parent
468  break;
469 
470  case self::MODE_ALL_BLOCKED:
471  $force_noti->setValue((string) $current_mode);
472  break;
473 
474  case self::MODE_ALL:
475  $force_noti->setValue((string) self::MODE_ALL_BLOCKED);
477  $changeable->setChecked(true);
478  break;
479  }
480  }
481  }
482  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$lng
This class represents a checkbox property in a property form.
global $DIC
Definition: feed.php:28
This class represents a property in a property form.
setRequired(bool $a_required)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ canCurrentUserEdit()

ilMembershipNotifications::canCurrentUserEdit ( )

Definition at line 337 of file class.ilMembershipNotifications.php.

References ANONYMOUS_USER_ID, ILIAS\UI\examples\Chart\Bar\Horizontal\custom(), getMode(), and ILIAS\Repository\user().

337  : bool
338  {
339  $user_id = $this->user->getId();
340  if ($user_id === ANONYMOUS_USER_ID) {
341  return false;
342  }
343 
344  switch ($this->getMode()) {
345  case self::MODE_SELF:
346  case self::MODE_ALL:
347  return true;
348 
349  case self::MODE_ALL_BLOCKED:
350  return false;
351 
352  case self::MODE_CUSTOM:
353  return !(array_key_exists($user_id, $this->custom) && $this->custom[$user_id] === self::VALUE_BLOCKED);
354  }
355  return false;
356  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
+ Here is the call graph for this function:

◆ cloneSettings()

ilMembershipNotifications::cloneSettings ( int  $new_ref_id)

Definition at line 527 of file class.ilMembershipNotifications.php.

527  : void
528  {
529  $set = $this->db->queryF(
530  "SELECT * FROM member_noti " .
531  " WHERE ref_id = %s ",
532  array("integer"),
533  array($this->ref_id)
534  );
535  while ($rec = $this->db->fetchAssoc($set)) {
536  $this->db->insert("member_noti", array(
537  "ref_id" => array("integer", $new_ref_id),
538  "nmode" => array("integer", $rec["nmode"])
539  ));
540  }
541  }

◆ deactivateUser()

ilMembershipNotifications::deactivateUser ( int  $a_user_id = null)

Definition at line 251 of file class.ilMembershipNotifications.php.

References toggleUser().

251  : bool
252  {
253  return $this->toggleUser(false, $a_user_id);
254  }
toggleUser(bool $a_status, int $a_user_id=null)
+ Here is the call graph for this function:

◆ getActiveUsers()

ilMembershipNotifications::getActiveUsers ( )

Definition at line 192 of file class.ilMembershipNotifications.php.

References ILIAS\UI\examples\Chart\Bar\Horizontal\custom(), getMode(), getParticipants(), and ILIAS\Repository\int().

Referenced by isCurrentUserActive().

192  : array
193  {
194  $users = $all = array();
195  $part_obj = $this->getParticipants();
196  if ($part_obj) {
197  $all = $part_obj->getParticipants();
198  }
199  if (!$all) {
200  return [];
201  }
202 
203  switch ($this->getMode()) {
204  // users decide themselves
205  case self::MODE_SELF:
206  $set = $this->db->query("SELECT usr_id" .
207  " FROM usr_pref" .
208  " WHERE keyword = " . $this->db->quote("grpcrs_ntf_" . $this->ref_id, "text") .
209  " AND value = " . $this->db->quote(self::VALUE_ON, "text"));
210  while ($row = $this->db->fetchAssoc($set)) {
211  $users[] = (int) $row["usr_id"];
212  }
213  break;
214 
215  // all members, mind opt-out
216  case self::MODE_ALL:
217  // users who did opt-out
218  $inactive = array();
219  $set = $this->db->query("SELECT usr_id" .
220  " FROM usr_pref" .
221  " WHERE keyword = " . $this->db->quote("grpcrs_ntf_" . $this->ref_id, "text") .
222  " AND value = " . $this->db->quote(self::VALUE_OFF, "text"));
223  while ($row = $this->db->fetchAssoc($set)) {
224  $inactive[] = (int) $row["usr_id"];
225  }
226  $users = array_diff($all, $inactive);
227  break;
228 
229  // all members, no opt-out
230  case self::MODE_ALL_BLOCKED:
231  $users = $all;
232  break;
233 
234  // custom settings
235  case self::MODE_CUSTOM:
236  foreach ($this->custom as $user_id => $status) {
237  if ($status !== self::VALUE_OFF) {
238  $users[] = $user_id;
239  }
240  }
241  break;
242  }
243  return array_intersect($all, $users);
244  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveUsersforAllObjects()

static ilMembershipNotifications::getActiveUsersforAllObjects ( )
static

Get active notifications for all objects.

Definition at line 361 of file class.ilMembershipNotifications.php.

References $DIC, $ilDB, $log, $ref_id, $res, ILIAS\Repository\int(), and ilTree\isDeleted().

Referenced by ilMembershipCronNotificationsData\load().

361  : array
362  {
363  global $DIC;
364 
365  $ilDB = $DIC->database();
366  $tree = $DIC->repositoryTree();
367  $log = $DIC->logger()->mmbr();
368 
369  $res = [];
370  if (self::isActive()) {
371  $objects = [];
372 
373  // user-preference data (MODE_SELF)
374  $log->debug("read usr_pref");
375  $set = $ilDB->query("SELECT DISTINCT(keyword) keyword" .
376  " FROM usr_pref" .
377  " WHERE " . $ilDB->like("keyword", "text", "grpcrs_ntf_%") .
378  " AND value = " . $ilDB->quote("1", "text"));
379  while ($row = $ilDB->fetchAssoc($set)) {
380  $ref_id = substr($row["keyword"], 11);
381  $objects[(int) $ref_id] = (int) $ref_id;
382  }
383 
384  // all other modes
385  $log->debug("read member_noti");
386  $set = $ilDB->query("SELECT ref_id" .
387  " FROM member_noti");
388  while ($row = $ilDB->fetchAssoc($set)) {
389  $objects[(int) $row["ref_id"]] = (int) $row["ref_id"];
390  }
391 
392  // this might be slow but it is to be used in CRON JOB ONLY!
393  foreach (array_unique($objects) as $ref_id) {
394  // :TODO: enough checking?
395  if (!$tree->isDeleted($ref_id)) {
396  $log->debug("get active users");
397  $noti = new self($ref_id);
398  $active = $noti->getActiveUsers();
399  if (count($active)) {
400  $res[$ref_id] = $active;
401  }
402  }
403  }
404  }
405  return $res;
406  }
$res
Definition: ltiservices.php:69
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
global $DIC
Definition: feed.php:28
$log
Definition: result.php:33
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMode()

ilMembershipNotifications::getMode ( )

Definition at line 113 of file class.ilMembershipNotifications.php.

References $mode.

Referenced by canCurrentUserEdit(), getActiveUsers(), and toggleUser().

113  : int
114  {
115  return $this->mode;
116  }
+ Here is the caller graph for this function:

◆ getParticipants()

ilMembershipNotifications::getParticipants ( )
protected

Definition at line 174 of file class.ilMembershipNotifications.php.

References $participants, ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), and ilObject\_lookupObjId().

Referenced by getActiveUsers().

174  : ?\ilParticipants
175  {
176  if ($this->participants === null) {
177  $grp_ref_id = $this->tree->checkForParentType($this->ref_id, "grp");
178  if ($grp_ref_id) {
179  $this->participants = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjId($grp_ref_id));
180  }
181 
182  if (!$this->participants) {
183  $crs_ref_id = $this->tree->checkForParentType($this->ref_id, "crs");
184  if ($crs_ref_id) {
185  $this->participants = ilCourseParticipants::_getInstanceByObjId(ilObject::_lookupObjId($crs_ref_id));
186  }
187  }
188  }
189  return $this->participants;
190  }
static _lookupObjId(int $ref_id)
static _getInstanceByObjId(int $a_obj_id)
Base class for course and group participants.
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUser()

ilMembershipNotifications::getUser ( int  $a_user_id = null)
protected

Definition at line 256 of file class.ilMembershipNotifications.php.

References $user, ANONYMOUS_USER_ID, ilObject\getId(), and ILIAS\Repository\user().

Referenced by toggleUser().

256  : ?ilObjUser
257  {
258  if (
259  $a_user_id === null ||
260  $a_user_id === $this->user->getId()
261  ) {
262  $user = $this->user;
263  } else {
264  $user = new ilObjUser($a_user_id);
265  }
266 
267  if (
268  $user->getId() &&
270  ) {
271  return $user;
272  }
273  return null;
274  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importFromForm()

static ilMembershipNotifications::importFromForm ( int  $a_ref_id,
?ilPropertyFormGUI  $a_form = null 
)
static

Definition at line 484 of file class.ilMembershipNotifications.php.

References $DIC, $http, ILIAS\Repository\$refinery, and ILIAS\Repository\int().

Referenced by ilContainerNewsSettingsGUI\save(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

484  : void
485  {
486  global $DIC;
487 
488  $http = $DIC->http();
489  $refinery = $DIC->refinery();
490 
491  if ($a_ref_id && self::isActive()) {
492  $noti = new self($a_ref_id);
493  $has_changeable_cb = ($noti->isValidMode(self::MODE_ALL_BLOCKED) && $noti->isValidMode(self::MODE_ALL));
494  $changeable = null;
495  if (!$a_form) {
496  $mode = 0;
497  if ($http->wrapper()->post()->has('force_noti')) {
498  $mode = $http->wrapper()->post()->retrieve(
499  'force_noti',
500  $refinery->kindlyTo()->int()
501  );
502  }
503 
504  if ($has_changeable_cb) {
505  $changeable = 0;
506  if ($http->wrapper()->post()->has('force_noti_allblk')) {
507  $changeable = $http->wrapper()->post()->retrieve(
508  'force_noti_allblk',
509  $refinery->kindlyTo()->int()
510  );
511  }
512  }
513  } else {
514  $mode = (int) $a_form->getInput("force_noti");
515  if ($has_changeable_cb) {
516  $changeable = $a_form->getInput("force_noti_allblk");
517  }
518  }
519  // checkbox (all) is subitem of all_blocked
520  if ($changeable && $mode === self::MODE_ALL_BLOCKED) {
521  $mode = self::MODE_ALL;
522  }
523  $noti->switchMode($mode);
524  }
525  }
global $DIC
Definition: feed.php:28
$http
Definition: raiseError.php:7
Refinery Factory $refinery
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActive()

static ilMembershipNotifications::isActive ( )
static

Definition at line 63 of file class.ilMembershipNotifications.php.

References $DIC, and $ilSetting.

63  : bool
64  {
65  global $DIC;
66 
67  $ilSetting = $DIC['ilSetting'];
68  if (!$ilSetting->get("block_activated_news") || !$ilSetting->get("crsgrp_ntf")) {
69  return false;
70  }
71  return true;
72  }
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:17

◆ isActiveForRefId()

static ilMembershipNotifications::isActiveForRefId ( int  $ref_id)
static

Definition at line 74 of file class.ilMembershipNotifications.php.

References ilContainer\_lookupContainerSetting(), and ilObject\_lookupObjId().

Referenced by ilObjGroupGUI\initHeaderAction(), and ilObjCourseGUI\initHeaderAction().

74  : bool
75  {
76  if (!self::isActive()) {
77  return false;
78  }
79  // see #31471, #30687, and ilNewsItem::getNewsForRefId
81  if (
82  !ilContainer::_lookupContainerSetting($obj_id, 'cont_use_news', "1") ||
83  (
84  !ilContainer::_lookupContainerSetting($obj_id, 'cont_show_news', "1") &&
85  !ilContainer::_lookupContainerSetting($obj_id, 'news_timeline')
86  )
87  ) {
88  return false;
89  }
90  return true;
91  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCurrentUserActive()

ilMembershipNotifications::isCurrentUserActive ( )

Definition at line 332 of file class.ilMembershipNotifications.php.

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

332  : bool
333  {
334  return in_array($this->user->getId(), $this->getActiveUsers());
335  }
+ Here is the call graph for this function:

◆ isValidMode()

ilMembershipNotifications::isValidMode ( int  $a_value)
protected

Definition at line 125 of file class.ilMembershipNotifications.php.

References $valid.

Referenced by setMode(), and switchMode().

125  : bool
126  {
127  $valid = array(
128  self::MODE_SELF
129  ,
130  self::MODE_ALL
131  ,
132  self::MODE_ALL_BLOCKED
133  );
134  return in_array($a_value, $valid);
135  }
$valid
+ Here is the caller graph for this function:

◆ read()

ilMembershipNotifications::read ( )
protected

Definition at line 93 of file class.ilMembershipNotifications.php.

References ILIAS\UI\examples\Chart\Bar\Horizontal\custom(), ILIAS\Repository\int(), and setMode().

Referenced by __construct().

93  : void
94  {
95  $set = $this->db->query("SELECT nmode mode" .
96  " FROM member_noti" .
97  " WHERE ref_id = " . $this->db->quote($this->ref_id, "integer"));
98  if ($this->db->numRows($set)) {
99  $row = $this->db->fetchAssoc($set);
100  $this->setMode((int) $row["mode"]);
101 
102  if ((int) $row["mode"] === self::MODE_CUSTOM) {
103  $set = $this->db->query("SELECT *" .
104  " FROM member_noti_user" .
105  " WHERE ref_id = " . $this->db->quote($this->ref_id, "integer"));
106  while ($row = $this->db->fetchAssoc($set)) {
107  $this->custom[(int) $row["user_id"]] = (int) $row["status"];
108  }
109  }
110  }
111  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMode()

ilMembershipNotifications::setMode ( int  $a_value)
protected

Definition at line 118 of file class.ilMembershipNotifications.php.

References isValidMode().

Referenced by __construct(), read(), and switchMode().

118  : void
119  {
120  if ($this->isValidMode($a_value)) {
121  $this->mode = $a_value;
122  }
123  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchMode()

ilMembershipNotifications::switchMode ( int  $a_new_mode)

Definition at line 137 of file class.ilMembershipNotifications.php.

References isValidMode(), and setMode().

137  : void
138  {
139  if (!$this->ref_id) {
140  return;
141  }
142 
143  if (
144  $this->mode &&
145  $this->mode !== $a_new_mode &&
146  $this->isValidMode($a_new_mode)
147  ) {
148  $this->db->manipulate("DELETE FROM member_noti" .
149  " WHERE ref_id = " . $this->db->quote($this->ref_id, "integer"));
150 
151  // no custom data
152  if ($a_new_mode !== self::MODE_CUSTOM) {
153  $this->db->manipulate("DELETE FROM member_noti_user" .
154  " WHERE ref_id = " . $this->db->quote($this->ref_id, "integer"));
155  }
156 
157  // mode self is default
158  if ($a_new_mode !== self::MODE_SELF) {
159  $this->db->insert("member_noti", array(
160  "ref_id" => array("integer", $this->ref_id),
161  "nmode" => array("integer", $a_new_mode)
162  ));
163  }
164 
165  // remove all user settings (all active is preset, optional opt out)
166  if ($a_new_mode === self::MODE_ALL) {
167  $this->db->manipulate("DELETE FROM usr_pref" .
168  " WHERE " . $this->db->like("keyword", "text", "grpcrs_ntf_" . $this->ref_id));
169  }
170  }
171  $this->setMode($a_new_mode);
172  }
+ Here is the call graph for this function:

◆ toggleUser()

ilMembershipNotifications::toggleUser ( bool  $a_status,
int  $a_user_id = null 
)
protected

Definition at line 276 of file class.ilMembershipNotifications.php.

References ILIAS\UI\examples\Chart\Bar\Horizontal\custom(), ilObject\getId(), getMode(), getUser(), ILIAS\Repository\int(), ilObjUser\setPref(), and ilObjUser\writePrefs().

Referenced by activateUser(), and deactivateUser().

276  : bool
277  {
278  if (!self::isActive()) {
279  return false;
280  }
281 
282  switch ($this->getMode()) {
283  case self::MODE_ALL:
284  case self::MODE_SELF:
285  // current user!
286  $user = $this->getUser();
287  if ($user instanceof ilObjUser) {
288  // blocked value not supported in user pref!
289  if ($a_status === true) {
290  $string_value = '1';
291  } else {
292  $string_value = '0';
293  }
294 
295  $user->setPref("grpcrs_ntf_" . $this->ref_id, $string_value);
296  $user->writePrefs();
297  return true;
298  }
299  break;
300 
301  case self::MODE_CUSTOM:
302  $user = $this->getUser($a_user_id);
303  if ($user instanceof ilObjUser) {
304  $user_id = $user->getId();
305 
306  // did status change at all?
307  if (!array_key_exists($user_id, $this->custom) || $this->custom[$user_id] !== (int) $a_status) {
308  $this->custom[$user_id] = (int) $a_status;
309 
310  $this->db->replace(
311  "member_noti_user",
312  array(
313  "ref_id" => array("integer", $this->ref_id),
314  "user_id" => array("integer", $user_id),
315  ),
316  array(
317  "status" => array("integer", (int) $a_status)
318  )
319  );
320  }
321  return true;
322  }
323  break;
324 
325  case self::MODE_ALL_BLOCKED:
326  // no individual settings
327  break;
328  }
329  return false;
330  }
setPref(string $a_keyword, ?string $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $custom

array ilMembershipNotifications::$custom
protected

Definition at line 39 of file class.ilMembershipNotifications.php.

◆ $db

ilDBInterface ilMembershipNotifications::$db
protected

Definition at line 42 of file class.ilMembershipNotifications.php.

◆ $mode

int ilMembershipNotifications::$mode
protected

Definition at line 37 of file class.ilMembershipNotifications.php.

Referenced by getMode().

◆ $participants

ilParticipants ilMembershipNotifications::$participants = null
protected

Definition at line 40 of file class.ilMembershipNotifications.php.

Referenced by getParticipants().

◆ $ref_id

int ilMembershipNotifications::$ref_id
protected

Definition at line 36 of file class.ilMembershipNotifications.php.

Referenced by getActiveUsersforAllObjects().

◆ $setting

ilSetting ilMembershipNotifications::$setting
protected

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

◆ $tree

ilTree ilMembershipNotifications::$tree
protected

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

◆ $user

ilObjUser ilMembershipNotifications::$user
protected

Definition at line 44 of file class.ilMembershipNotifications.php.

Referenced by getUser().

◆ MODE_ALL

const ilMembershipNotifications::MODE_ALL = 2
protected

Definition at line 32 of file class.ilMembershipNotifications.php.

◆ MODE_ALL_BLOCKED

const ilMembershipNotifications::MODE_ALL_BLOCKED = 3
protected

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

◆ MODE_CUSTOM

const ilMembershipNotifications::MODE_CUSTOM = 4
protected

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

◆ MODE_SELF

const ilMembershipNotifications::MODE_SELF = 1
protected

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

◆ VALUE_BLOCKED

const ilMembershipNotifications::VALUE_BLOCKED = 2
protected

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

◆ VALUE_OFF

const ilMembershipNotifications::VALUE_OFF = 0
protected

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

◆ VALUE_ON

const ilMembershipNotifications::VALUE_ON = 1
protected

Definition at line 29 of file class.ilMembershipNotifications.php.


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