function data_get_table in Data 6
Same name and namespace in other branches
- 8 data.module \data_get_table()
- 7 data.module \data_get_table()
Get a table if it exists.
Parameters
$name: Unique name of the table.
Return value
A unique DataTable object if defined, FALSE otherwise.
Note: In some circumstances, a table may be defined while it does not exist in the database. In these cases, data_get_table() would still return a valid DataTable object.
See also
DataTable class.
16 calls to data_get_table()
- DataTestCaseAPI::testAPIFunctions in tests/
data.test - Test API functions of DataTable and DataHandler.
- DataTestCaseUI::testChangeManagement in data_ui/
tests/ data_ui.test - Test change management on UI.
- DataViewsBulkOperationsHelper::load in data_vbo/
data_vbo.module - data_drop_table in ./
data.module - @todo: remove.
- data_get_all_tables in ./
data.module - Load all data tables.
File
- ./
data.module, line 85 - Hooks and API functions for data module.
Code
function data_get_table($name) {
data_include('DataTable');
$table = DataTable::instance($name);
if ($table
->defined()) {
return $table;
}
return FALSE;
}