function render(Am_View $view, User $user = null) { $out = $this->is_custom ? $this->content : sprintf('<div class="am-info am-notification">%s %s</div>', $view->escape($this->content), $this->url ? sprintf('<a href="%s"%s>%s</a>', $view->escape(REL_ROOT_URL . '/misc/notification/' . $this->getDi()->app->obfuscate($this->pk())), $this->is_blank ? 'target="_blank"' : '', ___('click here')) : ''); $t = new Am_SimpleTemplate(); $t->user = $user; return $t->render($out); }