/** * Return an error. * * If $abort_handling is true the clietside error handling will not be polled * @param string $message The error message * @param bool $abort_handling Abort clientside success/error handling * @return AjaxResponse The created response */ public static function Error($message, $abort_handling = false) { $data = new stdClass(); $data->error = $message; $data->abort = $abort_handling; return AjaxResponse::Json($data); }