You are here

function organigrams_machine_name_load in Organigrams 7

Get an organigrams object matching an organigrams machine name.

Parameters

string $name: An organigrams machine name.

Return value

mixed An organigrams object with all of its metadata if exists, otherwise FALSE. Results are statically cached.

7 calls to organigrams_machine_name_load()
organigrams_check_machine_name in ./organigrams.module
Add an index to a machine name if it already exists to make sure its unique.
organigrams_form_export in ./organigrams.admin.inc
Admin menu callback to export all items from an organigram.
organigrams_form_import_items in ./organigrams.admin.inc
Admin menu callback to import all items into an organigram.
organigrams_tokens in ./organigrams.module
Implements hook_tokens().
organigrams_user_access in ./organigrams.module
Get a value indicating whether the user perform the operation.

... See full list

1 string reference to 'organigrams_machine_name_load'
organigrams_form_organigrams in ./organigrams.admin.inc
Create or edit an organigram form.

File

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

Code

function organigrams_machine_name_load($name) {

  // Retrieve the organigrams containing the name.
  $organigrams = organigrams_load_multiple(FALSE, array(
    'machine_name' => $name,
  ));

  // Return the first entry.
  return reset($organigrams);
}