public function message($message, $config = array())
    {
        $config = new AnConfig($config);

        $config->append(array(
            'type' => 'info',
            'block' => true,
            'closable' => false,
        ));

        $alertblock = ($config->block) ? 'alert-block' : '';

        $close_handler = '';
        if ($config->closable) {
            $close_handler = '<a class="close" data-dismiss="alert">&times;</a>';
        }

        $message = AnTranslator::_($message);

        return "<div class=\"alert alert-{$config->type} $alertblock\">$close_handler<p>$message</p></div>";
    }
public function message($message, $config = array())
    {
        $config = new AnConfig($config);

        $config->append(array(
            'type' => 'info',
            'block' => true,
            'closable' => false,
        ));

        $alertblock = ($config->block) ? 'alert-block' : '';

        $close_handler = '';
        if ($config->closable) {
            $close_handler = '<a class="close" data-dismiss="alert">&times;</a>';
        }

        $message = AnTranslator::_($message);

        return "<div class=\"alert alert-{$config->type} $alertblock\">$close_handler<p>$message</p></div>";
    }
public function message ( $ message , $ config = array ( ) ) { $ config = new AnConfig ( $ config ) ; $ config -> append ( array ( 'type' => 'info' , 'block' => true , 'closable' => false , ) ) ; $ alertblock = ( $ config -> block ) ? 'alert-block' : '' ; $ close_handler = '' ; if ( $ config -> closable ) { $ close_handler = '<a class="close" data-dismiss="alert">&times;</a>' ; } $ message = AnTranslator :: _ ( $ message ) ; return "<div class=\"alert alert-{$config->type} $alertblock\">$close_handler<p>$message</p></div>" ; }
Renders a message.

@param string $message
@param array  $config
Renders a message .