* Theme::messages() * * Returns an unordered list (HTML) for the message or * the message array. depending on the $html variable * * @param bool $html Return it as html? (false=array) * @return string(html) or array */
($html = TRUE)
| 176 | * @return string(html) or array |
| 177 | */ |
| 178 | function messages($html = TRUE) |
| 179 | { |
| 180 | if (!$html) |
| 181 | { |
| 182 | return $this->_messages; |
| 183 | } |
| 184 | |
| 185 | $html = ''; |
| 186 | $html .= '<ul class="messages">'; |
| 187 | foreach($this->_messages as $message) |
| 188 | { |
| 189 | $html .= sprintf('<li class="%s">%s</li>', $message['type'], $message['message']); |
| 190 | } |
| 191 | $html .= '</ul>'; |
| 192 | return $html; |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * Theme::content() |