1.20.x view.inc view::get_items($type, $display_id = NULL)

Get an array of items for the current display.

File

modules/views/includes/view.inc, line 2237
Provides the view object type and associated methods.

Class

view
An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.

Code

function get_items($type, $display_id = NULL) {
  $this->set_display($display_id);

  if (!isset($display_id)) {
    $display_id = $this->current_display;
  }

  // Get info about the types so we can get the right data.
  $types = views_object_types();
  return $this->display[$display_id]->handler->get_option($types[$type]['plural']);
}