Swat/SwatMessageDisplay.php
protected function displayMessage(
        $message_id,
        SwatMessage $message,
        $first = false,
        $last = false
    ) {
        $message_div = new SwatHtmlTag('div');
        $container_div = new SwatHtmlTag('div');

        $message_div->id = $this->id . '_' . $message_id;
        $message_div->class = $message->getCSSClassString();

        if ($first) {
            $message_div->class .= ' swat-message-first';
        }

        if ($last) {
            $message_div->class .= ' swat-message-last';
        }

        $message_div->open();

        $container_div->class = 'swat-message-container';
        $container_div->open();

        $primary_content = new SwatHtmlTag('h3');
        $primary_content->class = 'swat-message-primary-content';
        $primary_content->setContent(
            $message->primary_content,
            $message->content_type
        );

        $primary_content->display();

        if ($message->secondary_content !== null) {
            $secondary_div = new SwatHtmlTag('div');
            $secondary_div->class = 'swat-message-secondary-content';
            $secondary_div->setContent(
                $message->secondary_content,
                $message->content_type
            );

            $secondary_div->display();
        }

        $container_div->close();
        $message_div->close();
    }
protected function displayMessage(
        $message_id,
        SwatMessage $message,
        $first = false,
        $last = false
    ) {
        $message_div = new SwatHtmlTag('div');
        $container_div = new SwatHtmlTag('div');

        $message_div->id = $this->id . '_' . $message_id;
        $message_div->class = $message->getCSSClassString();

        if ($first) {
            $message_div->class .= ' swat-message-first';
        }

        if ($last) {
            $message_div->class .= ' swat-message-last';
        }

        $message_div->open();

        $container_div->class = 'swat-message-container';
        $container_div->open();

        $primary_content = new SwatHtmlTag('h3');
        $primary_content->class = 'swat-message-primary-content';
        $primary_content->setContent(
            $message->primary_content,
            $message->content_type
        );

        $primary_content->display();

        if ($message->secondary_content !== null) {
            $secondary_div = new SwatHtmlTag('div');
            $secondary_div->class = 'swat-message-secondary-content';
            $secondary_div->setContent(
                $message->secondary_content,
                $message->content_type
            );

            $secondary_div->display();
        }

        $container_div->close();
        $message_div->close();
    }
protected function displayMessage ( $ message_id , SwatMessage $ message , $ first = false , $ last = false ) { $ message_div = new SwatHtmlTag ( 'div' ) ; $ container_div = new SwatHtmlTag ( 'div' ) ; $ message_div -> id = $ this -> id . '_' . $ message_id ; $ message_div -> class = $ message -> getCSSClassString ( ) ; if ( $ first ) { $ message_div -> class .= ' swat-message-first' ; } if ( $ last ) { $ message_div -> class .= ' swat-message-last' ; } $ message_div -> open ( ) ; $ container_div -> class = 'swat-message-container' ; $ container_div -> open ( ) ; $ primary_content = new SwatHtmlTag ( 'h3' ) ; $ primary_content -> class = 'swat-message-primary-content' ; $ primary_content -> setContent ( $ message -> primary_content , $ message -> content_type ) ; $ primary_content -> display ( ) ; if ( $ message -> secondary_content !== null ) { $ secondary_div = new SwatHtmlTag ( 'div' ) ; $ secondary_div -> class = 'swat-message-secondary-content' ; $ secondary_div -> setContent ( $ message -> secondary_content , $ message -> content_type ) ; $ secondary_div -> display ( ) ; } $ container_div -> close ( ) ; $ message_div -> close ( ) ; }
Display a single message of this message display

@param integer $message_id a unique identifier for the message within
this message display.
@param SwatMessage $message the message to display.
@param boolean $first optional. Whether or not the message is the first
message in this message display.
@param boolean $last optional. Whether or not the message is the last
message in this message display.
Display a single message of this message display