return c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LIST_ITEM, $id, $classes);
}
-
/**
* Create a new HTML markup class with default settings populated.
*
}
/**
+ * Converts a given error message into a processed string.
+ *
+ * @param c_base_error $code
+ * The error message code.
+ * @param bool $arguments
+ * (optional) When TRUE, argument placeholders are added.
+ * When FALSE, no placeholders are provided.
+ * All placeholders should begin with a single colon ':' and be wrapped within '{}', such that 'example' placeholder is ':{example}'.
+ * @param bool $function_name
+ * (optional) When TRUE, the function name is included with the message.
+ * When FALSE, no funciton name is provided.
+ * @param null|string $additional_message
+ * (optional) Any additional messages to display.
+ * @param bool $use_html
+ * (optional) When TRUE, the message is escaped and then wrapped in HTML.
+ * When FALSE, no HTML wrapping or escaping is peformed.
+ *
+ * @return c_base_return_string
+ * A processed string is returned on success.
+ * FALSE with error bit set is returned on error.
+ *
+ * @see: s_get_message()
+ */
+ protected function pr_get_error_text($error, $arguments = TRUE, $function_name = FALSE, $additional_message = NULL, $html = FALSE) {
+ if (!($error instanceof c_base_error)) {
+ return new c_base_return_false();
+ }
+
+ return c_base_return_string::s_new('');
+ }
+
+ /**
* Load text for a supported language.
*
* @param int $index
final class c_standard_path_server_error_ja extends c_standard_path_server_error {
/**
+ * Implements pr_get_error_text().
+ */
+ protected function pr_get_error_text($error, $arguments = TRUE, $function_name = FALSE, $additional_message = NULL, $html = FALSE) {
+ if (!($error instanceof c_base_error)) {
+ return new c_base_return_false();
+ }
+
+ require_once('common/base/classes/base_error_messages_japanese.php');
+ return c_base_error_messages_japanese::s_render_error_message($error, $arguments, $function_name, $additional_message, $html);
+ }
+
+ /**
* Implements pr_get_text().
*/
protected function pr_get_text($code, $arguments = []) {
case 1:
$string = 'リクエストの処理中に問題が発生しました。しばらくしてからもう一度お試しください。';
break;
+ case 2:
+ $string = 'エラーメッセージ';
+ break;
}
if (!empty($arguments)) {
$wrapper->set_tag($this->pr_create_tag_text_block(1));
+ // append any error messages to the page.
+ $errors = $this->session->get_error();
+ if (is_array($errors) && !empty($errors)) {
+ $error_wrapper = $this->pr_create_tag_wrapper('error-block');
+ $error_wrapper->set_tag($this->pr_create_tag_header(2, 2, 'error-block-title'));
+
+ $error_list = $this->pr_create_tag_list();
+ foreach ($errors as $error) {
+ $error_text = $this->pr_get_error_text($error);
+ if (!($error_text instanceof c_base_return_string)) {
+ unset($error_text);
+ continue;
+ }
+
+ $text = $this->pr_create_tag_text($error_text->get_value_exact());
+ unset($error_text);
+
+ $list_item = $this->pr_create_tag_list_item();
+ $list_item->set_tag($text);
+ unset($text);
+
+ $error_list->set_tag($list_item);
+ unset($list_item);
+ }
+ unset($error);
+
+ $error_wrapper->set_tag($error_list);
+ unset($error_list);
+
+ $wrapper->set_tag($error_wrapper);
+ unset($error_wrapper);
+ }
+
+
// initialize the content as HTML.
$this->pr_create_html(FALSE);
$this->html->set_tag($wrapper);
}
/**
+ * Implements pr_get_error_text().
+ */
+ protected function pr_get_error_text($error, $arguments = TRUE, $function_name = FALSE, $additional_message = NULL, $html = FALSE) {
+ if (!($error instanceof c_base_error)) {
+ return new c_base_return_false();
+ }
+
+ require_once('common/base/classes/base_error_messages_english.php');
+ return c_base_error_messages_english::s_render_error_message($error, $arguments, $function_name, $additional_message, $html);
+ }
+
+ /**
* Implements pr_get_text().
*/
protected function pr_get_text($code, $arguments = []) {
case 1:
$string = 'Something went wrong while processing your request, please try again later.';
break;
+ case 2:
+ $string = 'Error Messages';
+ break;
}
if (!empty($arguments)) {