function _preRender($controller) { parent::_preRender($controller); try { $flash = Strass_Flash::current(); $d = $controller->view->document->addDialog()->addFlags($flash->level)->setId('flash'); $d->addParagraph($flash->message)->addFlags('message'); $d->addParagraph($flash->detail)->addFlags('detail'); $flash->clear(); } catch (Strass_Flash_Empty $e) { } }
function direct($level, $message, $detail = null) { $flash = new Strass_Flash($level, $message, $detail); $flash->save(); return $flash; }