summaryrefslogtreecommitdiff
path: root/sites/all/modules/views/handlers/views_handler_area_messages.inc
blob: eb1e22ae873988fbadd2976ce465864340511250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

/**
 * @file
 * Contains views_handler_area_messages.
 */

/**
 * Provides an area for messages.
 */
class views_handler_area_messages extends views_handler_area {

  /**
   * {@inheritdoc}
   */
  public function option_definition() {
    $options = parent::option_definition();
    // Set the default to TRUE so it shows on empty pages by default.
    $options['empty']['default'] = TRUE;
    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function render($empty = FALSE) {
    $return = '';
    if (!$empty || !empty($this->options['empty'])) {
      $return = theme('status_messages');
    }
    return $return;
  }

}