public function display($type = null)
    {
        $result = '';

        if ( ! is_null($type) && ! in_array($type, $this->types)) {
            return $result;
        }

        if (in_array($type, $this->types)) {
            $result .= $this->buildMessages($_SESSION[$this->key][$type], $type);
        } elseif (is_null($type)) {
            foreach ($_SESSION[$this->key] as $messageType => $messages) {
                $result .= $this->buildMessages($messages, $messageType);
            }
        }

        $this->clear($type);

        return $result;
    }
public function display($type = null)
    {
        $result = '';

        if ( ! is_null($type) && ! in_array($type, $this->types)) {
            return $result;
        }

        if (in_array($type, $this->types)) {
            $result .= $this->buildMessages($_SESSION[$this->key][$type], $type);
        } elseif (is_null($type)) {
            foreach ($_SESSION[$this->key] as $messageType => $messages) {
                $result .= $this->buildMessages($messages, $messageType);
            }
        }

        $this->clear($type);

        return $result;
    }
public function display ( $ type = null ) { $ result = '' ; if ( ! is_null ( $ type ) && ! in_array ( $ type , $ this -> types ) ) { return $ result ; } if ( in_array ( $ type , $ this -> types ) ) { $ result .= $ this -> buildMessages ( $ _SESSION [ $ this -> key ] [ $ type ] , $ type ) ; } elseif ( is_null ( $ type ) ) { foreach ( $ _SESSION [ $ this -> key ] as $ messageType => $ messages ) { $ result .= $ this -> buildMessages ( $ messages , $ messageType ) ; } } $ this -> clear ( $ type ) ; return $ result ; }
Returns Bootstrap ready HTML for Engine messages.

@param string $type - message type: success, info, warning, error

@return string - HTML with flash messages
Returns Bootstrap ready HTML for Engine messages .