function TripalBundle_load
3.x tripal.module | TripalBundle_load($bundle_type, $reset = FALSE) |
File
- tripal/
tripal.module, line 929 - The core Tripal module
Code
function TripalBundle_load($bundle_type, $reset = FALSE) {
// Get the type of entity by the ID.
$bundle = db_select('tripal_bundle', 'tdt')
->fields('tdt')
->condition('name', $bundle_type)
->execute()
->fetchObject();
if ($bundle) {
$entity = entity_load('TripalBundle', array($bundle->id), array(), $reset);
return reset($entity);
}
return FALSE;
}