messages.php 580 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Elgg global system message list
  4. * Lists all system messages
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. *
  9. * @uses $vars['object'] The array of message registers
  10. */
  11. echo '<ul class="elgg-system-messages">';
  12. // hidden li so we validate
  13. echo '<li class="hidden"></li>';
  14. if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
  15. foreach ($vars['object'] as $type => $list ) {
  16. foreach ($list as $message) {
  17. echo "<li class=\"elgg-message elgg-state-$type\">";
  18. echo elgg_autop($message);
  19. echo '</li>';
  20. }
  21. }
  22. }
  23. echo '</ul>';