1 view.inc view::get_item($display_id, $type, $id)

Get the configuration of an item (field/sort/filter/etc) on a given display.

File

core/modules/views/includes/view.inc, line 2190
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_item($display_id, $type, $id) {
  // Get info about the types so we can get the right data.
  $types = views_object_types();
  // Initialize the display
  $this->set_display($display_id);

  // Get the existing configuration
  $fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);

  return isset($fields[$id]) ? $fields[$id] : NULL;
}