/**
* Get and prepare system message data for output
*
* @return array An array contains system message
*
* @since 3.5
*/
private function getData()
{
// Initialise variables.
$lists = array();
// Get the message queue
$messages = Factory::getApplication()->getMessageQueue();
// Build the sorted message list
if (\is_array($messages) && !empty($messages)) {
foreach ($messages as $msg) {
if (isset($msg['type']) && isset($msg['message'])) {
$lists[$msg['type']][] = $msg['message'];
}
}
}
return $lists;
}