You are here

function panels_display::get_title in Panels 6.3

Same name and namespace in other branches
  1. 8.3 panels.module \panels_display::get_title()
  2. 7.3 panels.module \panels_display::get_title()

Get the title from a display.

The display must have already been rendered, or the setting to set the display's title from a pane's title will not have worked.

Return value

The title to use. If NULL, this means to let any default title that may be in use pass through. i.e, do not actually set the title.

File

./panels.module, line 652
panels.module

Class

panels_display
Forms the basis of a panel display

Code

function get_title() {
  switch ($this->hide_title) {
    case PANELS_TITLE_NONE:
      return '';
    case PANELS_TITLE_PANE:
      return isset($this->stored_pane_title) ? $this->stored_pane_title : '';
    case PANELS_TITLE_FIXED:
    case FALSE:

      // For old exported panels that are not in the database.
      if (!empty($this->title)) {
        return filter_xss_admin(ctools_context_keyword_substitute($this->title, array(), $this->context));
      }
      return NULL;
  }
}