You are here

function acquia_lift_profiles_delete_action in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 acquia_lift_profiles/acquia_lift_profiles.module \acquia_lift_profiles_delete_action()

Calls the Acquia Lift Profiles API to delete an event corresponding to a Visitor Actions action

Parameters

$action_name: The name of the action to delete from Acquia Lift Profiles.

1 call to acquia_lift_profiles_delete_action()
acquia_lift_profiles_visitor_actions_delete_action in acquia_lift_profiles/acquia_lift_profiles.module
Implements hook_visitor_actions_delete_action().

File

acquia_lift_profiles/acquia_lift_profiles.module, line 467
acquia_lift_profiles.module Provides Acquia Lift Profiles integration.

Code

function acquia_lift_profiles_delete_action($action_name) {
  try {
    $acquia_lift_profiles_api = ALProfilesAPI::getInstance(variable_get('acquia_lift_profiles_account_name', ''), variable_get('acquia_lift_profiles_site_name', ''), variable_get('acquia_lift_profiles_api_url', ''));
    $acquia_lift_profiles_api
      ->deleteEvent($action_name);
  } catch (ALProfilesException $e) {
    watchdog('acquia_lift_profiles', 'There was a problem deleting the action @action from Acquia Lift Profiles. Please try again later.', array(
      '@action' => $action_name,
    ), WATCHDOG_ERROR);
  }
}