1
0
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:
Toby Zerner
2015-05-04 08:55:44 +09:30
parent 78bd2d513d
commit 14ce14cbf2
2 changed files with 5 additions and 2 deletions

View File

@@ -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())

View File

@@ -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;
}
}