Triggered before an Administration Area page is rendered.
In the event handler you can inject new variables to the view document.
public function subscribeEvents()
{
Backend::$events->addEvent('backend:onBeforeRenderPage', $this, 'backend_render_page');
}
public function backend_render_page($controller, $view)
{
if ($controller instanceof Shop_Orders and basename($view) == 'create')
{
Phpr::$session->flash['error'] = 'We are sorry, you cannot create new orders in the Demo store.';
$controller->viewData['fatalError'] = true;
}
}