mirror of
https://github.com/flarum/core.git
synced 2025-07-24 18:21:33 +02:00
Pass action in RenderView event so that handler can access actor
This commit is contained in:
@@ -50,7 +50,7 @@ class IndexAction extends BaseAction
|
||||
$root.'/less/forum/app.less'
|
||||
]);
|
||||
|
||||
event(new RenderView($view, $assetManager));
|
||||
event(new RenderView($view, $assetManager, $this));
|
||||
|
||||
return $view
|
||||
->with('styles', $assetManager->getCSSFiles())
|
||||
|
@@ -6,9 +6,12 @@ class RenderView
|
||||
|
||||
public $assets;
|
||||
|
||||
public function __construct(&$view, $assets)
|
||||
public $action;
|
||||
|
||||
public function __construct(&$view, $assets, $action)
|
||||
{
|
||||
$this->view = &$view;
|
||||
$this->assets = $assets;
|
||||
$this->action = $action;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user