mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
Add actor to extension update event
This commit is contained in:
parent
8e39edb200
commit
b2d8f3dd5b
|
@ -85,7 +85,7 @@ class UpdateExtensionHandler
|
|||
}
|
||||
|
||||
$this->events->dispatch(
|
||||
new Updated($extension)
|
||||
new Updated($command->actor, $extension)
|
||||
);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -10,16 +10,23 @@
|
|||
namespace Flarum\PackageManager\Extension\Event;
|
||||
|
||||
use Flarum\Extension\Extension;
|
||||
use Flarum\User\User;
|
||||
|
||||
class Updated
|
||||
{
|
||||
/**
|
||||
* @var User
|
||||
*/
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* @var Extension
|
||||
*/
|
||||
public $extension;
|
||||
|
||||
public function __construct(Extension $extension)
|
||||
public function __construct(User $actor, Extension $extension)
|
||||
{
|
||||
$this->actor = $actor;
|
||||
$this->extension = $extension;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user