function _data_load_table in Data 8
Same name and namespace in other branches
- 6 data.module \_data_load_table()
- 7 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.
4 calls to _data_load_table()
- Table::create in src/
Table.php - Create a table.
- Table::defined in src/
Table.php - Determine whether a table is defined.
- Table::__construct in src/
Table.php - Constructor. Do not call directly, but use DataTable::instance($name) instead.
- _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 321 - Hooks and API functions for data module.
Code
function _data_load_table($name = NULL, $reset = FALSE) {
// @todo: implement this.
return 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;
}