function organigrams_load in Organigrams 7
Get an organigrams object matching the organigrams ID.
Parameters
int $oid: An organigrams ID.
Return value
object An organigrams object if exists, otherwise FALSE. Results are statically cache.
8 calls to organigrams_load()
- organigrams_block_view in ./
organigrams.module - Implements hook_block_view().
- organigrams_delete in ./
organigrams.module - Delete an organigram given the organigrams ID.
- organigrams_form_organigrams_item in ./
organigrams_item.admin.inc - Create or edit form for an organigrams item.
- organigrams_import_items in ./
organigrams.module - Import organigram items in an existing organigram.
- organigrams_item_save in ./
organigrams.module - Save an organigrams item given an organigrams item object.
File
- ./
organigrams.module, line 1494 - Defines the organigrams functions and entity types.
Code
function organigrams_load($oid) {
// Initialize the organigrams to FALSE.
$organigrams = FALSE;
// Validate oid argument.
if (is_numeric($oid)) {
// Load the organigrams.
$organigrams = organigrams_load_multiple(array(
$oid,
), array());
// Assign the first entry to organigrams.
$organigrams = reset($organigrams);
}
// Return the organigrams.
return $organigrams;
}