Add event action storage. Closes #2344

This commit is contained in:
James Brooks
2017-02-03 22:34:13 +00:00
parent c2790e29cc
commit 3dc154dff1
92 changed files with 1512 additions and 128 deletions

View File

@@ -11,6 +11,7 @@
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
@@ -18,7 +19,7 @@ use CachetHQ\Cachet\Models\User;
*
* @author James Brooks <james@alt-three.com>
*/
final class UserWasWelcomedEvent implements UserEventInterface
final class UserWasWelcomedEvent implements ActionInterface, UserEventInterface
{
/**
* The user.
@@ -48,4 +49,17 @@ final class UserWasWelcomedEvent implements UserEventInterface
{
return 'User was welcomed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}