1 view.inc view::set_item_option($display_id, $type, $id, $option, $value)

Set an option on an item.

Use this only if you have just 1 or 2 options to set; if you have many, consider getting the item, adding the options and doing set_item yourself.

File

core/modules/views/includes/view.inc, line 2296
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 set_item_option($display_id, $type, $id, $option, $value) {
  $item = $this->get_item($display_id, $type, $id);
  $item[$option] = $value;
  $this->set_item($display_id, $type, $id, $item);
}