You are here

public function ALProfilesContext::getPossibleValues in Acquia Lift Connector 7

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

Implements PersonalizeContextInterface::getPossibleValues().

File

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

Class

ALProfilesContext
@file Provides a context plugin for Acquia Lift Profiles

Code

public function getPossibleValues($limit = FALSE) {
  $possible_values = array();
  $options = $this
    ->getOptions();
  foreach ($options as $name => $info) {
    $possible_values[$name] = array(
      'value type' => 'boolean',
      'friendly name' => t('Acquia Lift Profiles segment: @segment', array(
        '@segment' => $name,
      )),
      'on_label' => t('Yes'),
      'off_label' => t('No'),
    );
  }
  if ($limit) {
    $possible_values = array_intersect_key($possible_values, array_flip($this->selectedContext));
  }
  return $possible_values;
}