views_handler_area_messages.inc 650 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_area_messages.
  5. */
  6. /**
  7. * Provides an area for messages.
  8. */
  9. class views_handler_area_messages extends views_handler_area {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function option_definition() {
  14. $options = parent::option_definition();
  15. // Set the default to TRUE so it shows on empty pages by default.
  16. $options['empty']['default'] = TRUE;
  17. return $options;
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function render($empty = FALSE) {
  23. $return = '';
  24. if (!$empty || !empty($this->options['empty'])) {
  25. $return = theme('status_messages');
  26. }
  27. return $return;
  28. }
  29. }