/** * Allows you to throw up an error page. The error template is derived from the $action passed. * * @access public * @param string $action * @param array $args * @return void */ public function error($action, array $args = array()) { if (!isset($args['pageTitle'])) { switch ($action) { case is_numeric($action): $args['pageTitle'] = $action; if ($title = $this->Response->statusCode($action)) { $args['pageTitle'] .= ' - ' . $title; $this->Response->status($action); } break; default: $args['pageTitle'] = Inflector::normalize($action); break; } } // Build arguments $args['referrer'] = $this->Request->referrer(); $args['url'] = 'todo'; //Router::construct(Router::current()); $this->View->set($args); $this->View->configure(array('error' => true, 'layout' => 'error', 'template' => $action)); return; }