You are here

public function AcquiaLiftContext::getPossibleValues in Acquia Lift Connector 7

Implements PersonalizeAgentInterface::getPossibleValues().

The Acquia Lift API does not allow values that aren't already selected for agent context. Therefore $limit is always treated as true.

File

plugins/visitor_context/AcquiaLiftContext.inc, line 106
Provides an agent type for Acquia Lift

Class

AcquiaLiftContext
@file Provides an agent type for Acquia Lift

Code

public function getPossibleValues($limit = FALSE) {
  if (!preg_match('/^acquia_lift/', $this->agent
    ->getType())) {
    return array();
  }
  $possible_values = array();
  try {
    $possible_values = $this->liftAPI
      ->getPossibleValues($this->agent
      ->getMachineName());
  } catch (AcquiaLiftException $e) {
    drupal_set_message($e
      ->getMessage(), 'error');
  }
  return $possible_values;
}