You are here

function hook_apps_app_info in Apps 7

2 invocations of hook_apps_app_info()
apps_add_app_info in ./apps.manifest.inc
@TODO: Add function description
apps_modules_enabled in ./apps.module
Implements hook_modules_enabled().

File

./apps.api.php, line 17
API documentation for the Apps module.

Code

function hook_apps_app_info() {
  return array(
    // Demo Content.
    'demo content description' => 'This tells what add demo content will do it is placed on the configure form',
    // The preferred way for an app to provide demo content is to have a module
    // that when enabled will add demo content, and when disabled will removed
    // demo content.
    // This module should be a sub-module or part of the manifest dependent
    // modules.
    'demo content module' => 'appname_demo_content',
    // If the demo content is provided in a different way one should provide the
    // following callbacks:
    // - This callback should return TRUE if demo content is on.
    'demo content enabled' => 'appname_demo_content_enabled',
    // - This callback should turn on demo content and return TRUE.
    'demo content enable' => 'appname_demo_content_enable',
    // - This callback should turn off demo content and return TRUE.
    'demo content disable' => 'appname_demo_content_disable',
    // This form will be rendered on the app config page:
    'configure form' => 'appname_app_configure_form',
    'post install callback' => 'appname_app_post_install',
    // This will be called after the app is enabled initially or when the app
    // has been uninstalled.
    'status callback' => 'appname_app_status',
    // This will provide permission configuration on the configure form.
    // This will also set the permissions on install of the app.
    'permissions' => array(
      'access my app' => array(
        'role 1',
        'role 2',
      ),
    ),
    // Same format as permissions but key includes [entity type]:[bundle] of the
    // the og group the permission should default for.
    'og permissions' => array(
      'node:group:create myapp content' => array(
        'role 1',
        'role 2',
      ),
    ),
  );

  /*
  This callback is used to render a status table on the config page.
  It should be an array with two keys (and on optional third)
  array(
    'title' =>'Status'  // title of the table,
    'items' => array(  // rows in the table with any keys
      array(
        // REQUIREMENT_OK REQUIREMENT_INFO, REQUIREMENT_ERROR
        'severity' =>    REQUIREMENT_WARNING,
        'title' => 'Example',
        'description' => t("Instructions for Example"),
        'action' => array(l("Link to do something!", "")),
       ),
    ),
    // headers are optional but these are the default
    'headers' => array('severity', 'title', 'description', 'action')
  );
  */
}