You are here

function acquia_lift_implement_test_structure in Acquia Lift Connector 7.2

Implements the structure, including all sub-tests, required by the targeting.

Parameters

$agent_data: The parent personalization.

Return value

array An array of nested tests that need to be deleted in Lift following the implementation of the test structure.

Throws

\AcquiaLiftException

1 call to acquia_lift_implement_test_structure()
acquia_lift_target_set_status in ./acquia_lift.admin.inc
Update the status of an acquia lift target agent and synchronize any necessary configuration to Lift.

File

./acquia_lift.admin.inc, line 1609
acquia_lift.admin.inc Provides functions needed for the admin UI.

Code

function acquia_lift_implement_test_structure($agent_data) {
  if (isset($agent_data->data['variation_set_handling']) && $agent_data->data['variation_set_handling'] == ACQUIA_LIFT_DECISION_MULTIVARIATE) {
    acquia_lift_implement_mvt($agent_data);
  }
  else {
    acquia_lift_implement_targeting($agent_data);
  }

  // Once we implement the structure for a personalization, we do not allow
  // adding or removing variation sets.
  // @todo This can be revisited later, it is simply too cumbersome to support
  //   such post-implementation changes at this time and the use-case of multiple
  //   variation sets so is small that it does not warrant such effort.
  $agent_data->data['locked_for_variation_sets'] = TRUE;
  personalize_agent_save($agent_data);
}