You are here

function services_ctools_export_ui::set_item_state in Services 6.3

Same name and namespace in other branches
  1. 7.3 plugins/export_ui/services_ctools_export_ui.class.php \services_ctools_export_ui::set_item_state()

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/services_ctools_export_ui.class.php, line 45
Export-ui handler for the Services module.

Class

services_ctools_export_ui
@file Export-ui handler for the Services module.

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);
  }
}