You are here

function organigrams_item_load in Organigrams 7

Get an organigrams item object matching the organigrams item ID.

Parameters

int $iid: An organigrams item ID.

Return value

object An organigrams item object if exists, otherwise FALSE. Results are statically cached.

2 calls to organigrams_item_load()
organigrams_item_delete in ./organigrams.module
Delete an organigrams item.
organigrams_item_get_parent in ./organigrams.module
Find parent of a given organigrams item ID.

File

./organigrams.module, line 1518
Defines the organigrams functions and entity types.

Code

function organigrams_item_load($iid) {

  // Initialize the organigrams item to FALSE.
  $organigrams_item = FALSE;

  // Validate iid argument.
  if (is_numeric($iid)) {

    // Load the organigrams item.
    $organigrams_items = organigrams_item_load_multiple(array(
      $iid,
    ), array());

    // Assign the first entry to organigrams_item.
    $organigrams_item = reset($organigrams_items);
  }

  // Return the organigrams item.
  return $organigrams_item;
}