You are here

function views_ui::set_item_state in Views (for Drupal 7) 7.3

Set an item's state to enabled or disabled and output to user.

If javascript is in use, this will rebuild the list and send that back as though the filter form had been executed.

Overrides ctools_export_ui::set_item_state

File

plugins/export_ui/views_ui.class.php, line 430
Contains the CTools Export UI integration code.

Class

views_ui
CTools Export UI class handler for Views UI.

Code

function set_item_state($state, $js, $input, $item) {
  ctools_export_set_object_status($item, $state);
  menu_rebuild();
  if (!$js) {
    drupal_goto(ctools_export_ui_plugin_base_path($this->plugin));
  }
  else {
    return $this
      ->list_page($js, $input);
  }
}