You are here

private function FeatureContext::convertContexts in Acquia Lift Connector 7.2

Generates the targeting contexts based on a list of context values

Parameters

array $feature_contexts: Feature contexts to be added

Return value

array The context values formatted for Lift.

2 calls to FeatureContext::convertContexts()
FeatureContext::createAudiences in behat-tests/features/bootstrap/FeatureContext.php
@Given /^audiences:$/
FeatureContext::createPersonalizedElements in behat-tests/features/bootstrap/FeatureContext.php
@Given /^personalized elements:$/

File

behat-tests/features/bootstrap/FeatureContext.php, line 1069

Class

FeatureContext
Defines application features from the specific context.

Code

private function convertContexts($feature_contexts) {
  $context_values = array();

  // Grab explicit targeting values if specified.
  if (!empty($values)) {
    $contexts = variable_get('personalize_url_querystring_contexts', array());
    foreach ($feature_contexts as $context) {
      if (isset($contexts[$context])) {
        foreach ($contexts[$context] as $value) {
          $context_values[] = $context . '::' . $value;
        }
      }
    }
  }
  return $context_values;
}