You are here

function app_profile_enable_module in Apps 7

@TODO: Add function description

_name

Parameters

$module:

$context:

1 string reference to 'app_profile_enable_module'
apps_profile_enable_app_modules in ./apps.profile.inc
Install downloaded apps.

File

./apps.profile.inc, line 446
The install functions for the Apps module.

Code

function app_profile_enable_module($module, $module_name, &$context) {

  // This is here to show the user that we are in the process of enabling
  $context['message'] = t('Enabled %module app', array(
    '%module' => $module_name,
  ));

  // Enable the module and record any errors
  if (!module_enable(array(
    $module,
  ))) {
    $context['results']['errors'][$module] = t('There was an error enabling @module app.', array(
      '@module' => $module_name,
    ));
  }
  else {
    $context['results']['enabled modules'][] = $module;
  }

  // Successful outcome
  $context['finished'] = TRUE;
}