You are here

function views_plugin_display::get_link_display in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 plugins/views_plugin_display.inc \views_plugin_display::get_link_display()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::get_link_display()

Check to see which display to use when creating links within a view using this display.

2 calls to views_plugin_display::get_link_display()
views_plugin_display::get_path in plugins/views_plugin_display.inc
Return the base path to use for this display.
views_plugin_display::options_summary in plugins/views_plugin_display.inc
Provide the default summary for options in the views UI.

File

plugins/views_plugin_display.inc, line 683
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function get_link_display() {
  $display_id = $this
    ->get_option('link_display');

  // If unknown, pick the first one.
  if (empty($display_id) || empty($this->view->display[$display_id])) {
    foreach ($this->view->display as $display_id => $display) {
      if (!empty($display->handler) && $display->handler
        ->has_path()) {
        return $display_id;
      }
    }
  }
  else {
    return $display_id;
  }

  // fall-through returns NULL
}