function acquia_lift_target_default_js_settings in Acquia Lift Connector 7.2
Returns the basic js settings needed by acquia_lift_target.
Parameters
null $agent_name: An optional agent to include nested_tests for.
Return value
array
2 calls to acquia_lift_target_default_js_settings()
- AcquiaLiftTarget::getAssets in plugins/
agent_types/ AcquiaLiftTarget.inc - Implements PersonalizeAgentInterface::getAssets().
- acquia_lift_personalize_option_set_render in ./
acquia_lift.module - Implements hook_personalize_option_set_render().
File
- ./
acquia_lift.module, line 914 - acquia_lift.module Provides Acquia Lift-specific personalization functionality.
Code
function acquia_lift_target_default_js_settings($agent_name = NULL) {
$settings = array(
'default_target' => ACQUIA_LIFT_TARGETING_EVERYONE_ELSE,
'test_agent_plugin' => ACQUIA_LIFT_TESTING_AGENT,
'agent_map' => array(),
'option_sets' => array(),
'nested_tests' => array(),
);
if (!empty($agent_name)) {
$settings['nested_tests'][$agent_name] = array();
$agent = personalize_agent_load($agent_name);
$nested_tests = acquia_lift_get_nested_tests($agent);
foreach ($nested_tests as $test) {
$settings['nested_tests'][$agent_name][$test] = $test;
}
}
return $settings;
}