ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Membership notification settings. More...
Public Member Functions | |
__construct ($a_ref_id) | |
Constructor. More... | |
getMode () | |
Get mode. More... | |
switchMode ($a_new_mode) | |
Switch mode for object. More... | |
getActiveUsers () | |
Get active notifications for current object. More... | |
activateUser ($a_user_id=null) | |
Activate notification for user. More... | |
deactivateUser ($a_user_id=null) | |
Deactivate notification for user. More... | |
isCurrentUserActive () | |
Get user notification status. More... | |
canCurrentUserEdit () | |
Can user change notification status? More... | |
Static Public Member Functions | |
static | isActive () |
Is feature active? More... | |
static | getActiveUsersforAllObjects () |
Get active notifications for all objects. More... | |
static | addToSettingsForm ($a_ref_id, ilPropertyFormGUI $a_form=null, ilFormPropertyGUI $a_input=null) |
Add notification settings to form. More... | |
static | importFromForm ($a_ref_id, ilPropertyFormGUI $a_form=null) |
Import notification settings from form. More... | |
Data Fields | |
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 |
Protected Member Functions | |
read () | |
Read from DB. More... | |
setMode ($a_value) | |
Set mode. More... | |
isValidMode ($a_value) | |
Is given mode valid? More... | |
getParticipants () | |
Init participants for current object. More... | |
getUser ($a_user_id=null) | |
Init user instance. More... | |
toggleUser ($a_status, $a_user_id=null) | |
Toggle user notification status. More... | |
Protected Attributes | |
$ref_id | |
$mode | |
$custom | |
$participants | |
Membership notification settings.
Definition at line 10 of file class.ilMembershipNotifications.php.
ilMembershipNotifications::__construct | ( | $a_ref_id | ) |
Constructor.
int | $a_ref_id |
Definition at line 32 of file class.ilMembershipNotifications.php.
References array, read(), and setMode().
ilMembershipNotifications::activateUser | ( | $a_user_id = null | ) |
Activate notification for user.
int | $a_user_id |
Definition at line 300 of file class.ilMembershipNotifications.php.
References toggleUser().
|
static |
Add notification settings to form.
int | $a_ref_id | |
ilPropertyFormGUI | $a_form | |
ilPropertyFormGUI | $a_input |
Definition at line 531 of file class.ilMembershipNotifications.php.
References $lng, ilSubEnabledFormPropertyGUI\addSubItem(), ilFormPropertyGUI\setRequired(), and ilRadioOption\setValue().
Referenced by ilContainerNewsSettingsGUI\initForm(), and ilObjectServiceSettingsGUI\initServiceSettingsForm().
ilMembershipNotifications::canCurrentUserEdit | ( | ) |
Can user change notification status?
Definition at line 430 of file class.ilMembershipNotifications.php.
References $ilUser, and getMode().
ilMembershipNotifications::deactivateUser | ( | $a_user_id = null | ) |
Deactivate notification for user.
int | $a_user_id |
Definition at line 311 of file class.ilMembershipNotifications.php.
References toggleUser().
ilMembershipNotifications::getActiveUsers | ( | ) |
Get active notifications for current object.
Definition at line 223 of file class.ilMembershipNotifications.php.
References $ilDB, $row, array, getMode(), and getParticipants().
Referenced by isCurrentUserActive().
|
static |
Get active notifications for all objects.
Definition at line 465 of file class.ilMembershipNotifications.php.
References $ilDB, $log, $ref_id, $res, $row, array, and ilLoggerFactory\getLogger().
Referenced by ilMembershipCronNotifications\run().
ilMembershipNotifications::getMode | ( | ) |
Get mode.
Definition at line 95 of file class.ilMembershipNotifications.php.
References $mode.
Referenced by canCurrentUserEdit(), getActiveUsers(), and toggleUser().
|
protected |
Init participants for current object.
Definition at line 189 of file class.ilMembershipNotifications.php.
References $participants, ilGroupParticipants\_getInstanceByObjId(), ilCourseParticipants\_getInstanceByObjId(), and ilObject\_lookupObjId().
Referenced by getActiveUsers().
|
protected |
Init user instance.
int | $a_user_id |
Definition at line 322 of file class.ilMembershipNotifications.php.
References $ilUser.
Referenced by toggleUser().
|
static |
Import notification settings from form.
int | $a_ref_id | |
ilPropertyFormGUI | $a_form |
Definition at line 618 of file class.ilMembershipNotifications.php.
Referenced by ilContainerNewsSettingsGUI\save(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().
|
static |
Is feature active?
Definition at line 49 of file class.ilMembershipNotifications.php.
References $ilSetting.
Referenced by ilObjGroupGUI\initHeaderAction(), and ilObjCourseGUI\initHeaderAction().
ilMembershipNotifications::isCurrentUserActive | ( | ) |
Get user notification status.
Definition at line 418 of file class.ilMembershipNotifications.php.
References $ilUser, and getActiveUsers().
|
protected |
Is given mode valid?
int | $a_value |
Definition at line 119 of file class.ilMembershipNotifications.php.
Referenced by setMode(), and switchMode().
|
protected |
Read from DB.
Definition at line 60 of file class.ilMembershipNotifications.php.
References $ilDB, $row, and setMode().
Referenced by __construct().
|
protected |
Set mode.
int | $a_value |
Definition at line 105 of file class.ilMembershipNotifications.php.
References isValidMode().
Referenced by __construct(), read(), and switchMode().
ilMembershipNotifications::switchMode | ( | $a_new_mode | ) |
Switch mode for object.
int | $a_new_mode |
Definition at line 136 of file class.ilMembershipNotifications.php.
References $ilDB, array, isValidMode(), and setMode().
|
protected |
Toggle user notification status.
bool | $a_status | |
int | $a_user_id |
Definition at line 350 of file class.ilMembershipNotifications.php.
References $ilDB, array, getMode(), and getUser().
Referenced by activateUser(), and deactivateUser().
|
protected |
Definition at line 14 of file class.ilMembershipNotifications.php.
|
protected |
Definition at line 13 of file class.ilMembershipNotifications.php.
Referenced by getMode(), and importFromForm().
|
protected |
Definition at line 15 of file class.ilMembershipNotifications.php.
Referenced by getParticipants().
|
protected |
Definition at line 12 of file class.ilMembershipNotifications.php.
Referenced by getActiveUsersforAllObjects().
const ilMembershipNotifications::MODE_ALL = 2 |
Definition at line 22 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::MODE_ALL_BLOCKED = 3 |
Definition at line 23 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::MODE_CUSTOM = 4 |
Definition at line 24 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::MODE_SELF = 1 |
Definition at line 21 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::VALUE_BLOCKED = 2 |
Definition at line 19 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::VALUE_OFF = 0 |
Definition at line 17 of file class.ilMembershipNotifications.php.
const ilMembershipNotifications::VALUE_ON = 1 |
Definition at line 18 of file class.ilMembershipNotifications.php.