function ctools_export_crud_load
Load a single exportable object.
Parameters
$table: The name of the table to use to retrieve $schema values. This table must have an 'export' section containing data or this function will fail.
$name: The unique ID to load. The field for this ID will be specified by the export key, which normally defaults to 'name'.
Return value
The loaded object.
Related topics
15 calls to ctools_export_crud_load()
- CtoolsExportCrudTestCase::testCrudExportDelete in tests/
ctools_export_test/ ctools_export.test - Tests CRUD operation: Delete.
- CtoolsExportCrudTestCase::testCrudExportLoad in tests/
ctools_export_test/ ctools_export.test - Tests CRUD operation: Load.
- CtoolsExportCrudTestCase::testCrudExportRevert in tests/
ctools_export_test/ ctools_export.test - Tests CRUD operation: Revert.
- CtoolsExportCrudTestCase::testCrudExportSave in tests/
ctools_export_test/ ctools_export.test - Tests CRUD operation: Save.
- CtoolsExportCrudTestCase::testCrudExportSetStatus in tests/
ctools_export_test/ ctools_export.test - Tests CRUD operation: Set status.
File
-
includes/
export.inc, line 73
Code
function ctools_export_crud_load($table, $name) {
$schema = ctools_export_get_schema($table);
$export = $schema['export'];
if (!empty($export['load callback']) && function_exists($export['load callback'])) {
return $export['load callback']($name);
}
else {
$result = ctools_export_load_object($table, 'names', array(
$name,
));
if (isset($result[$name])) {
return $result[$name];
}
}
}