You are here

function apps_install_page in Apps 7

Callback list off all apps

1 string reference to 'apps_install_page'
apps_menu in ./apps.module
Implements hook_menu().

File

./apps.pages.inc, line 75
The page callbacks for the Apps module.

Code

function apps_install_page($server_name) {
  apps_include('manifest');
  $element = array(
    '#theme' => 'apps_install_page',
  );

  //find all apps
  try {
    $apps = apps_apps($server_name, array(), TRUE);
    if (!empty($apps)) {
      $element['apps'] = $apps;
      $featured_apps = apps_apps($server_name, array(
        'featured' => TRUE,
      ));
      if (!empty($featured_apps)) {
        $element['featured_app'] = array_pop($featured_apps);
      }
    }
  } catch (Exception $e) {
    drupal_set_message(t("There was the following error: @msg", array(
      '@msg' => $e
        ->getMessage(),
    )), 'warning');
  }
  return $element;
}