protected function AcquiaLiftReport::getGraphLevelClass in Acquia Lift Connector 7
Gets the appropriate class name for a graph indicating percentage.
Parameters
$value: The percentage value expressed as a number between 0 and 1.
1 call to AcquiaLiftReport::getGraphLevelClass()
- AcquiaLiftReport::extractTargetingReportData in plugins/
agent_types/ AcquiaLiftAgent.inc - Extracts the required targeting report data from the items returned by Acquia Lift.
File
- plugins/
agent_types/ AcquiaLiftAgent.inc, line 2790 - Provides an agent type for Acquia Lift
Class
- AcquiaLiftReport
- Responsible retrieving and generating reports on the Acquia Lift agent.
Code
protected function getGraphLevelClass($value) {
if ($value >= 1) {
return 'acquia-lift-graph-level-5';
}
else {
if ($value >= 0.8) {
return 'acquia-lift-graph-level-4';
}
else {
if ($value >= 0.6 && $value < 0.8) {
return 'acquia-lift-graph-level-3';
}
else {
if ($value >= 0.4 && $value < 0.6) {
return 'acquia-lift-graph-level-2';
}
else {
if ($value >= 0.2 && $value < 0.4) {
return 'acquia-lift-graph-level-1';
}
else {
return 'acquia-lift-graph-level-0';
}
}
}
}
}
}