You are here

public static function ALProfilesContext::create in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 acquia_lift_profiles/plugins/visitor_context/ALProfilesContext.inc \ALProfilesContext::create()

Implements PersonalizeContextInterface::create().

File

acquia_lift_profiles/plugins/visitor_context/ALProfilesContext.inc, line 12
Provides a context plugin for Acquia Lift Profiles

Class

ALProfilesContext
@file Provides a context plugin for Acquia Lift Profiles

Code

public static function create(PersonalizeAgentInterface $agent = NULL, $selected_context = array()) {
  try {
    $acquia_lift_profiles_api = ALProfilesAPI::getInstance();
    return new self($agent, $selected_context, $acquia_lift_profiles_api);
  } catch (Exception $e) {
    watchdog('Acquia Lift Profiles', $e
      ->getMessage());
    return NULL;
  }
}