You are here

function data_export in Data 6

Same name and namespace in other branches
  1. 8 data.module \data_export()
  2. 7 data.module \data_export()

Export a data table. This does not export the content of a table - only its schema and any meta information (title, name, meta...).

Parameters

$name: The name of the table to be exported.

Return value

Exportable code.

Only available if ctools is installed.

2 calls to data_export()
DataTestCaseAPI::testAPIFunctions in tests/data.test
Test API functions of DataTable and DataHandler.
data_ui_export_form in data_ui/data_ui.admin.inc
Export form.

File

./data.module, line 362
Hooks and API functions for data module.

Code

function data_export($name, $indent = '') {
  ctools_include('export');
  $result = ctools_export_load_object('data_tables', 'names', array(
    $name,
  ));
  if (isset($result[$name])) {
    return ctools_export_object('data_tables', $result[$name], $indent);
  }
}