function _data_load_table in Data 7
Same name and namespace in other branches
- 8 data.module \_data_load_table()
- 6 data.module \_data_load_table()
Loads data table info from the database and from CTools exportables.
Parameters
$name: The name of a table to load. If NULL or omitted, all tables are loaded.
$reset: Whether to reset CTools' static cache.
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 351 - Hooks and API functions for data module.
Code
function _data_load_table($name = NULL, $reset = FALSE) {
ctools_include('export');
if ($reset) {
drupal_static_reset('ctools_export_load_object');
drupal_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;
}