MarkallasreadNotificationsCommand Class Reference
Mark all notifications of user as read. More...
Inheritance diagram for
MarkallasreadNotificationsCommand:
Public Member Functions |
|
get_description () | |
Returns a description of this command.
|
|
get_name () | |
Returns title of command. |
|
Protected Member Functions |
|
do_execute () | |
Do it. |
Detailed Description
Mark all notifications of user as read.
Definition at line 5 of file markallasread.cmd.php.
Member Function Documentation
MarkallasreadNotificationsCommand::do_execute | ( | ) | [protected] |
Do it.
- See also:
- core/behaviour/base/CommandTransactionaldo_execute()
Reimplemented from CommandChain.
Definition at line 25 of file markallasread.cmd.php.
00025 { 00026 $ret = new Status(); 00027 $user = Users::get_current_user(); 00028 if ($user) { 00029 Load::models('notifications'); 00030 $params = array('read_through' => Notifications::READ_MARK_ALL); 00031 $notifications = Notifications::create_unread_user_adapter($user->id); 00032 $notifications->find(); 00033 while($notifications->fetch()) { 00034 $this->append(CommandsFactory::create_command(clone($notifications), 'markread', $params)); 00035 } 00036 } 00037 return $ret; 00038 }
MarkallasreadNotificationsCommand::get_description | ( | ) |
Returns a description of this command.
Reimplemented from CommandBase.
Definition at line 16 of file markallasread.cmd.php.
00016 { 00017 return tr('Mark all as read', 'notifications'); 00018 }
MarkallasreadNotificationsCommand::get_name | ( | ) |
Returns title of command.
Reimplemented from CommandBase.
Definition at line 9 of file markallasread.cmd.php.
The documentation for this class was generated from the following file:
- contributions/usermanagement.notifications/behaviour/commands/notifications/markallasread.cmd.php