function openatrium_install_tasks in Open Atrium 7.2
Implements hook_install_tasks()
File
- ./
openatrium.install, line 11 - Perform actions to set up the site for this profile.
Code
function openatrium_install_tasks(&$install_state) {
$tasks = array();
// Add our custom CSS file for the installation process.
drupal_add_css(drupal_get_path('profile', 'openatrium') . '/openatrium.css');
require_once drupal_get_path('module', 'apps') . '/apps.profile.inc';
$server = array(
'machine name' => 'openatrium',
'default apps' => array(
// built-in apps.
'oa_discussion',
'oa_events',
'oa_wiki',
'oa_worktracker',
// Core addon apps.
'oa_admin',
'oa_appearance',
'oa_archive',
'oa_brand',
'oa_clone',
'oa_comment',
'oa_contextual_tabs',
'oa_events_import',
'oa_export',
'oa_favorites',
'oa_files',
'oa_home',
'oa_htmlmail',
'oa_media',
'oa_messages_digest',
'oa_notifications',
// Currently having problems with oa_project enabling during install
// So leave this off for now
// 'oa_project',.
'oa_related',
'oa_sandbox',
'oa_search',
'oa_sitemap',
'oa_site_layout',
'oa_site_layout_defaults',
'oa_styles',
'oa_subspaces',
'oa_toolbar',
'oa_tour',
'oa_tour_defaults',
'oa_wizard',
),
);
$tasks = apps_profile_install_tasks($install_state, $server);
$tasks['openatrium_features_revert_all'] = array(
'type' => 'normal',
);
// Set default permissions.
$tasks['openatrium_set_permissions'] = array(
'type' => 'normal',
);
// Need to rebuild search index tables since oa_search changes panopoly_search.
$tasks['openatrium_rebuild_search'] = array(
'type' => 'normal',
);
// Rebuild node access..
$tasks['openatrium_node_access_rebuild'] = array(
'type' => 'normal',
);
// Skip tasks if using quickstart.
if (!empty($install_state['parameters']['quickstart']) && $install_state['parameters']['quickstart'] == 'quick') {
foreach ($tasks as $task_name => $task) {
$tasks[$task_name]['run'] = INSTALL_TASK_SKIP;
}
}
/*** TASKS BELOW RUN EVEN WITH QUICKSTART ***/
// Revert bootstrap tour defaults.
$tasks['openatrium_revert_tours'] = array(
'type' => 'normal',
);
return $tasks;
}