public function messages()
    {
        $session = AnService::get('com:sessions');
        $queue = (array) $session->get('controller.queue', array());

        $session->set('controller.queue', null);

        if (isset($queue['message'])) {
            $message = $queue['message'];
            $config = array('closable' => true);

            if (isset($message['type'])) {
                $config['type'] = $message['type'];
            }

            return $this->getTemplate()->renderHelper('ui.message', $message['message'], $config);
        }

        return '';
    }