You are here

function ctools_export_get_schemas in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/export.inc \ctools_export_get_schemas()

Gets the schemas for all tables with ctools object metadata.

2 calls to ctools_export_get_schemas()
bulk_export_export in bulk_export/bulk_export.module
FAPI gateway to the bulk exporter.
ctools_export_get_schemas_by_module in includes/export.inc

File

includes/export.inc, line 821
Contains code to make it easier to have exportable objects.

Code

function ctools_export_get_schemas($for_export = FALSE) {
  static $export_tables;
  if (is_null($export_tables)) {
    $export_tables = array();
    $schemas = drupal_get_schema();
    foreach ($schemas as $table => $schema) {
      if (!isset($schema['export'])) {
        unset($schemas[$table]);
        continue;
      }
      $export_tables[$table] = ctools_export_get_schema($table);
    }
  }
  return $for_export ? array_filter($export_tables, '_ctools_export_filter_export_tables') : $export_tables;
}