You are here

function computing_get_applications in Drupal Computing 7.2

Get a list of Computing Application entities.

Parameters

string $application_name: if specified, then return only the application with the given application name. Or NULL to return all applications.:

Return value

array|mixed

3 calls to computing_get_applications()
computing_entity_info_alter in ./computing.entity.inc
Implements hook_entity_info_alter(). This seems to be the correct way to set ['bundles'] for custom entity types. Although for "node.module", it's set directly in hook_entity_info().
computing_list_command_page in ./computing.admin.inc
Generate the "Command" page. Code following the logic of system_admin_config_page().
computing_overview_form in ./computing.admin.inc
Generate the overview page.

File

./computing.module, line 136

Code

function computing_get_applications($application_name = NULL) {

  // entity_load will get the Entity controller for our model entity and call the load
  // function of that object - we are loading entities by name here.
  $applications = entity_load_multiple_by_name('computing_application', isset($application_name) ? array(
    $application_name,
  ) : FALSE);
  return isset($application_name) ? reset($applications) : $applications;
}