Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

ajax_build_message()

Description

Builds a message to be used in an AJAX response

Parameters

ColumnTypeDefaultDescription
$msg string An end-user message explaining what happened (as a generic message for fails or part of errors)

Return

array Returns a message

Location

include/ajax_functions.php lines 134 to 143

Definition

 
function ajax_build_message(string $msg)
    {
    
$msg trim($msg);
    if(
$msg == "")
        {
        
trigger_error("\$msg variable must not be empty.");
        }

    return array(
"message" => $msg);
    }

This article was last updated 19th March 2024 07:05 Europe/London time based on the source file dated 18th August 2023 11:30 Europe/London time.