You are here

public function views_plugin_row_node_view::init in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/node/views_plugin_row_node_view.inc \views_plugin_row_node_view::init()
  2. 6.2 modules/node/views_plugin_row_node_view.inc \views_plugin_row_node_view::init()

Overrides views_plugin_row::init

File

modules/node/views_plugin_row_node_view.inc, line 35
Definition of views_plugin_row_node_view.

Class

views_plugin_row_node_view
Plugin which performs a node_view on the resulting object.

Code

public function init(&$view, &$display, $options = NULL) {
  parent::init($view, $display, $options);

  // Handle existing views with the deprecated 'teaser' option.
  if (isset($this->options['teaser'])) {
    $this->options['build_mode'] = $this->options['teaser'] ? 'teaser' : 'full';
  }

  // Handle existing views which has used build_mode instead of view_mode.
  if (isset($this->options['build_mode'])) {
    $this->options['view_mode'] = $this->options['build_mode'];
  }
}