Joomla enqueueMessage() Method

Application

This function enqueues a system message. This function is defined in CMSApplication class.

  • string $msg - The message to enqueue.
  • string $type - The message type. Default is message.
  • return - void
public function enqueueMessage($msg, $type = 'message')
{
// Don't add empty messages.
if (trim($msg) === '')
{
return;
}

// For empty queue, if messages exists in the session, enqueue them first.
$messages = $this->getMessageQueue();

$message = array('message' => $msg, 'type' => strtolower($type));

if (!in_array($message, $this->_messageQueue))
{
// Enqueue the message.
$this->_messageQueue[] = $message;
}
}

 

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive