You are here

function _data_load_table in Data 6

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

Loads data table info from the database.

5 calls to _data_load_table()
DataTable::create in includes/DataTable.inc
Create a table.
DataTable::defined in includes/DataTable.inc
Determine whether a table is defined.
DataTable::__construct in includes/DataTable.inc
Constructor. Do not call directly, but use DataTable::instance($name) instead.
data_get_all_tables in ./data.module
Load all data tables.
_data_override in ./data.module
Starts overriding a data table by copying it from the default definition into the DB. This function does not have any effect if called on a table that does already exist in data_tables.

File

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

Code

function _data_load_table($name = NULL, $reset = FALSE) {
  ctools_include('export');
  if ($reset) {
    ctools_static_reset('ctools_export_load_object');
    ctools_static_reset('ctools_export_load_object_all');
  }
  if ($name === NULL) {
    return ctools_export_load_object('data_tables', 'all', array());
  }
  else {
    $tables = ctools_export_load_object('data_tables', 'names', array(
      $name,
    ));
    if (isset($tables[$name])) {
      return $tables[$name];
    }
    return FALSE;
  }
  return FALSE;
}