/**
* Send system messages back with the response
*
* @param string $hook "ajax_response"
* @param string $type "all"
* @param AjaxResponse $response Ajax response
* @param array $params Hook params
*
* @return AjaxResponse
* @access private
* @internal
*/
public function appendMessages($hook, $type, $response, $params)
{
if (!$response instanceof AjaxResponse) {
return;
}
$response->getData()->_elgg_msgs = (object) $this->msgs->dumpRegister();
return $response;
}