diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 0fab49b58..59c4ce941 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -51,6 +51,9 @@ abstract class Presenter extends Control implements Application\IPresenter /** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is starting */ public $onStartup; + /** @var callable[]&(callable(Presenter $sender): void)[]; Occurs when the presenter is rendering after beforeRender */ + public $onRender; + /** @var callable[]&(callable(Presenter $sender, IResponse $response): void)[]; Occurs when the presenter is shutting down */ public $onShutdown; @@ -213,6 +216,7 @@ public function run(Application\Request $request): Application\IResponse // RENDERING VIEW $this->beforeRender(); + $this->onRender($this); // calls $this->render() $this->tryCall($this->formatRenderMethod($this->view), $this->params); $this->afterRender();