You are here

function ctools_export_get_schemas in Chaos Tool Suite (ctools) 7

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

Gets the schemas for all tables with ctools object metadata.

3 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
_ctools_drush_export_info in drush/ctools.drush.inc
Return array of CTools exportable info based on available tables returned from ctools_export_get_schemas().

File

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

Code

function ctools_export_get_schemas($for_export = FALSE) {
  $export_tables =& drupal_static(__FUNCTION__);
  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;
}