mirror of
https://github.com/flarum/core.git
synced 2025-07-27 19:50:20 +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'
|
$root.'/less/forum/app.less'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
event(new RenderView($view, $assetManager));
|
event(new RenderView($view, $assetManager, $this));
|
||||||
|
|
||||||
return $view
|
return $view
|
||||||
->with('styles', $assetManager->getCSSFiles())
|
->with('styles', $assetManager->getCSSFiles())
|
||||||
|
@@ -6,9 +6,12 @@ class RenderView
|
|||||||
|
|
||||||
public $assets;
|
public $assets;
|
||||||
|
|
||||||
public function __construct(&$view, $assets)
|
public $action;
|
||||||
|
|
||||||
|
public function __construct(&$view, $assets, $action)
|
||||||
{
|
{
|
||||||
$this->view = &$view;
|
$this->view = &$view;
|
||||||
$this->assets = $assets;
|
$this->assets = $assets;
|
||||||
|
$this->action = $action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user