-
- /**
- * Render a 404 page (uses the template : tpl/404.tpl)
- * usage: $PAGE->render404('The link was deleted')
- *
- * @param string $message A message to display what is not found
- */
- public function render404($message = '')
- {
- if (empty($message)) {
- $message = t('The page you are trying to reach does not exist or has been deleted.');
- }
- header($_SERVER['SERVER_PROTOCOL'] . ' ' . t('404 Not Found'));
- $this->tpl->assign('error_message', $message);
- $this->renderPage('404');
- }