.

CreateNotificationsCommand Class Reference

Create a notifcation and send a mail, if necessary. More...

Inheritance diagram for CreateNotificationsCommand:
CreateCommand CommandTransactional CommandBase ICommand IAction ISerializable

List of all members.

Protected Member Functions

  do_execute ()

Detailed Description

Create a notifcation and send a mail, if necessary.

Definition at line 7 of file create.cmd.php.


Member Function Documentation

CreateNotificationsCommand::do_execute (  )  [protected]

Reimplemented from CreateCommand.

Definition at line 8 of file create.cmd.php.

00008                                         {
00009                 $ret = new Status();
00010                 Load::models('notifications');
00011                 $existing = Notifications::existing($this->get_params()); 
00012                 if (!$existing) {
00013                         $ret->merge(parent::do_execute());
00014                         if ($ret->is_ok()) {
00015                                 $n = $this->get_result();
00016                                 $cmd = CommandsFactory::create_command($n, 'mail', false);
00017                                 $ret->merge($cmd->execute());
00018                         }
00019                 }
00020                 else {
00021                         $this->set_result($existing);
00022                 }
00023                 return $ret;
00024         }

The documentation for this class was generated from the following file:
  • contributions/usermanagement.notifications/behaviour/commands/notifications/create.cmd.php