You are here

function acquia_lift_uninstall in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.3 acquia_lift.install \acquia_lift_uninstall()
  2. 7.2 acquia_lift.install \acquia_lift_uninstall()

Implements hook_uninstall().

File

./acquia_lift.install, line 41
Acquia Lift - Installation file.

Code

function acquia_lift_uninstall() {
  $vars = array(
    'acquia_lift_account_info',
    'acquia_lift_client_side_goals',
    'acquia_lift_batch_decisions',
    'acquia_lift_confidence_measure',
    'queue_class_acquia_lift_sync',
    'acquia_lift_min_runtime_num',
    'acquia_lift_min_runtime_unit',
    'acquia_lift_min_decisions',
    'acquia_lift_report_max_days',
  );
  foreach ($vars as $var) {
    variable_del($var);
  }

  // Delete the menu items and rebuild router information.
  menu_delete_links('acquia-lift-controls');
  menu_rebuild();

  // Delete any variables used to store report data sources for agents.
  foreach (personalize_agent_load_multiple() as $agent) {
    $variable_name = "acquia_lift_report_source_{$agent->machine_name}";
    variable_del($variable_name);
  }
}