function ctools_export_set_object_status

cis7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)
cle7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)
elmsmedia7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)
icor7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)
meedjum_blog7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)
mooc7 export.inc ctools_export_set_object_status($object, $new_status = TRUE)

Set the status of a default $object as a variable.

This is more efficient than ctools_export_set_status because it will actually unset the variable entirely if it's not necessary, this saving a bit of space.

5 calls to ctools_export_set_object_status()
ctools_export_crud_set_status in sites/all/modules/ulmus/ctools/includes/export.inc
Change the status of a certain object.
page_manager_page_enable in sites/all/modules/ulmus/ctools/page_manager/plugins/tasks/page.inc
Callback to enable/disable the page from the UI.
page_manager_save_page_cache in sites/all/modules/ulmus/ctools/page_manager/page_manager.module
Write all changes from the page cache and clear it out.
views_export_status in sites/all/modules/ulmus/views/views.module
Export callback to change view status.
views_ui::set_item_state in sites/all/modules/ulmus/views/plugins/export_ui/views_ui.class.php
Set an item's state to enabled or disabled and output to user.

File

sites/all/modules/ulmus/ctools/includes/export.inc, line 1103
Contains code to make it easier to have exportable objects.

Code

function ctools_export_set_object_status($object, $new_status = TRUE) {
  $table = $object->table;
  $schema = ctools_export_get_schema($table);
  $export = $schema['export'];
  $status = variable_get($export['status'], array());

  // Compare
  if (!$new_status && $object->export_type & EXPORT_IN_DATABASE) {
    unset($status[$object->{$export['key']}]);
  }
  else {
    $status[$object->{$export['key']}] = $new_status;
  }

  variable_set($export['status'], $status);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.