private function back($msg = null) { $alert = $msg ? 'alert("' . $msg . '");' : ''; return sprintf('<script>%s history.back();</script>', $alert); }