You are here

function _ctools_features_export_crud_delete in Features 7.2

Same name and namespace in other branches
  1. 6 includes/features.ctools.inc \_ctools_features_export_crud_delete()
  2. 7 includes/features.ctools.inc \_ctools_features_export_crud_delete()

Wrapper around ctools_export_crud_delete() for < 1.7 compatibility.

Parameters

string $table: Table name whose schema contains ctools 'export' information.

object $object: The fully populated object to delete, or the export key.

See also

\ctools_export_crud_delete()

1 call to _ctools_features_export_crud_delete()
ctools_component_features_revert in includes/features.ctools.inc
Master implementation of hook_features_revert() for all ctools components.

File

includes/features.ctools.inc, line 461
Features integration for 'ctools' module.

Code

function _ctools_features_export_crud_delete($table, $object) {
  if (ctools_api_version('1.7')) {
    ctools_export_crud_delete($table, $object);
  }
  else {
    $schema = ctools_export_get_schema($table);
    $export = $schema['export'];
    db_query("DELETE FROM {{$table}} WHERE {$export['key']} = '%s'", $object->{$export['key']});
  }
}