public function render($config = array())
    {
        $message = $config['message'];

        unset($config['message']);

        $message = '<p>'.$message.'</p>';
        $buttons = isset($config['buttons']) ? $config['buttons'] : array();

        unset($config['buttons']);

        if (! empty($buttons)) {
            foreach ($buttons as $label => $attrbs) {
                $buttons[$label] = $this->_renderButton($label, $attrbs);
            }

            $message .= '<p class="alert-actions">'.implode(' ', $buttons).'</p>';
        }

        return $this->_renderMessage($message, $config);
    }
public function render($config = array())
    {
        $message = $config['message'];

        unset($config['message']);

        $message = '<p>'.$message.'</p>';
        $buttons = isset($config['buttons']) ? $config['buttons'] : array();

        unset($config['buttons']);

        if (! empty($buttons)) {
            foreach ($buttons as $label => $attrbs) {
                $buttons[$label] = $this->_renderButton($label, $attrbs);
            }

            $message .= '<p class="alert-actions">'.implode(' ', $buttons).'</p>';
        }

        return $this->_renderMessage($message, $config);
    }
public function render ( $ config = array ( ) ) { $ message = $ config [ 'message' ] ; unset ( $ config [ 'message' ] ) ; $ message = '<p>' . $ message . '</p>' ; $ buttons = isset ( $ config [ 'buttons' ] ) ? $ config [ 'buttons' ] : array ( ) ; unset ( $ config [ 'buttons' ] ) ; if ( ! empty ( $ buttons ) ) { foreach ( $ buttons as $ label => $ attrbs ) { $ buttons [ $ label ] = $ this -> _renderButton ( $ label , $ attrbs ) ; } $ message .= '<p class="alert-actions">' . implode ( ' ' , $ buttons ) . '</p>' ; } return $ this -> _renderMessage ( $ message , $ config ) ; }
Renders a message using the passed configuration.

@param string $message The message to render
@param array  $config  Message configuration

@return string
Renders a message using the passed configuration .