function apps_app_config_page in Apps 7
Callback for app config page
1 string reference to 'apps_app_config_page'
- apps_menu in ./
apps.module - Implements hook_menu().
File
- ./
apps.pages.inc, line 152 - The page callbacks for the Apps module.
Code
function apps_app_config_page($app) {
apps_include('manifest');
$element = array();
if (apps_app_callback($app, "demo content enable callback")) {
$element['demo'] = drupal_get_form('apps_demo_content_form', $app);
}
// Check for a status table
if ($data_callback = apps_app_callback($app, "status callback")) {
$data = $data_callback();
$header = isset($data['header']) ? $data['header'] : NULL;
$items = isset($data['items']) ? $data['items'] : array();
$element['status'] = array(
'#type' => 'fieldset',
'#title' => t('Status'),
'table' => apps_app_status_report($items, $header),
);
}
if ($form = apps_app_callback($app, "configure form")) {
$element['config'] = drupal_get_form($form);
}
if (!empty($app['permissions'])) {
if (user_access('administer permissions')) {
$element['permissions'] = drupal_get_form('apps_admin_permissions', $app);
}
else {
$element['permissions']['#markup'] = t('This app has permissions that can be customized but you currently do not have permission to configure them. Please contact an administrator if this is in error.');
}
}
return $element;
}