function ctools_export_get_schema

cis7 ctools_export_get_schema($table)
cle7 ctools_export_get_schema($table)
elmsmedia7 ctools_export_get_schema($table)
icor7 ctools_export_get_schema($table)
meedjum_blog7 ctools_export_get_schema($table)
mooc7 ctools_export_get_schema($table)

Get the schema for a given table.

This looks for data the export subsystem needs and applies defaults so that it's easily available.

34 calls to ctools_export_get_schema()
ctools_component_features_export_options in sites/all/modules/ulmus/features/includes/
Master implementation of hook_features_export_options() for all ctools components.
ctools_component_features_export_render in sites/all/modules/ulmus/features/includes/
Master implementation of hook_features_export_render() for all ctools components.
ctools_export_crud_delete in sites/all/modules/ulmus/ctools/includes/
Delete a single exportable object.
ctools_export_crud_export in sites/all/modules/ulmus/ctools/includes/
Get the exported code of a single exportable object.
ctools_export_crud_import in sites/all/modules/ulmus/ctools/includes/
Turn exported code into an object.

... See full list


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


function ctools_export_get_schema($table) {
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['cache'] = &drupal_static(__FUNCTION__);
  $cache = &$drupal_static_fast['cache'];

  if (empty($cache[$table])) {
    $schema = drupal_get_schema($table);

    // If our schema isn't loaded, it's possible we're in a state where it
    // simply hasn't been cached. If we've been asked, let's force the
    // issue.
    if (!$schema || empty($schema['export'])) {
      // force a schema reset:
      $schema = drupal_get_schema($table, TRUE);

    if (!isset($schema['export'])) {
      return array();

    if (empty($schema['module'])) {
      return array();

    // Add some defaults
    $schema['export'] += array(
      'key' => 'name',
      'key name' => 'Name',
      'object' => 'stdClass',
      'status' => 'default_' . $table,
      'default hook' => 'default_' . $table,
      'can disable' => TRUE,
      'identifier' => $table,
      'primary key' => !empty($schema['primary key']) ? $schema['primary key'][0] : '',
      'bulk export' => TRUE,
      'list callback' => "$schema[module]_{$table}_list",
      'to hook code callback' => "$schema[module]_{$table}_to_hook_code",
      'cache defaults' => FALSE,
      'default cache bin' => 'cache',
      'export type string' => 'type',
      'boolean' => TRUE,

    // If the export definition doesn't have the "primary key" then the CRUD
    // save callback won't work.
    if (empty($schema['export']['primary key']) && user_access('administer site configuration')) {
      drupal_set_message(t('The export definition of @table is missing the "primary key" property.', array('@table' => $table)), 'error');

    // Notes:
    // The following callbacks may be defined to override default behavior
    // when using CRUD functions:
    // create callback
    // load callback
    // load multiple callback
    // load all callback
    // save callback
    // delete callback
    // export callback
    // import callback
    // See the appropriate ctools_export_crud function for details on what
    // arguments these callbacks should accept. Please do not call these
    // directly, always use the ctools_export_crud_* wrappers to ensure
    // that default implementations are honored.
    $cache[$table] = $schema;

  return $cache[$table];



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.