'This tells what add demo content will do it is placed on the configure form', //The perfered 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 submodule or part of the manifest dependent modules 'demo content module' => 'appname_demo_content', //If the demo content is provide in a differnt way one should provide the //following callbacks 'demo content enabled' => 'appname_demo_content_enabled', //should return True if demo content is on 'demo content enable' => 'appname_demo_content_enable', //should turn on demo content and return true 'demo content disable' => 'appname_demo_content_disable', //should turn off demo content and return true 'configure form' => 'appname_app_configure_form', // This form will be render on the app config page 'post install callback' => 'appname_app_post_install', // This will be called after the app is enabled intialy or of the app has been uninstalled 'status callback' => 'appname_app_status' /* This call back 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( 'severity' => REQUIREMENT_WARNING, //REQUIREMENT_OK REQUIREMENT_INFO, REQUIREMENT_ERROR 'title' => 'Example', 'description' => t("Instrunctions for Example"), 'action' => array(l("Link to do something!", "")), ), ), // headers are optional but these are the default 'headers' => array('severity', 'title', 'description', 'action') ); serverity and */ } /** * provides server information to the apps * * this hook is only called on the current profile * RETURN: an array of assoctive server arrays */ function hook_apps_servers_info() { return array( 'servername' => array( 'title' => t('Store Title'), //the title to be use for the server 'description' => t('A description of the server and what apps it might have'), 'manifest' => 'http://apps.com/app/query', // the location of the json manifest ), ); } /** * Add an apps install step to an installation profile. * * Use this in your hook_install_tasks to add all the needed tasks for installing * apps. Set the App Server key and any default selected apps. */ function hook_install_tasks($install_state) { $tasks = array(); require_once(drupal_get_path('module', 'apps') . '/apps.profile.inc'); $server = array( 'title' => 'App Server Name' 'machine name' => 'apps_server_machine_name', 'default apps' => array( 'app_machine_name_1', 'app_machine_name_2', ), 'required apps' => array( ), 'default content callback' => 'distro_default_content', ); $tasks = $tasks + apps_profile_install_tasks($install_state, $server); return $tasks; } /** * This is the struture of the json manifest */ $js = <<