function acquia_lift_report_decision_point_dropdown in Acquia Lift Connector 7
Returns a dropdown for filtering by decision point.
Parameters
array $options: The different decision point options.
$selected: The decision point to set as the default value.
Return value
array An array representing a dropdown select list.
1 call to acquia_lift_report_decision_point_dropdown()
- acquia_lift_report_custom in ./
acquia_lift.admin.inc - Form build function for a custom Acquia Lift agent report.
File
- ./
acquia_lift.admin.inc, line 672 - acquia_lift.admin.inc Provides functions needed for the admin UI.
Code
function acquia_lift_report_decision_point_dropdown($options, $selected) {
if (empty($options)) {
return array();
}
if (count($options) == 1) {
$option = key($options);
return array(
'#type' => 'hidden',
'#value' => $option,
);
}
return array(
'#title' => t('Variation Set'),
'#type' => 'select',
'#options' => $options,
'#default_value' => $selected,
'#ajax' => array(
'callback' => "acquia_lift_report_ajax_callback",
'wrapper' => "acquia-lift-reports",
),
'#id' => 'acquia-lift-report-decision-point-filter',
);
}