get('id')); $statusColor = $this->getColorForStatus($statusDetails[0]['status']); $this->setData($statusDetails[0]); return $this; } public function getCheckStatusUrl() { return "index.php?module=".$this->getModuleName()."&view=CheckStatus&record=".$this->getId(); } public function getColorForStatus($smsStatus) { if ($smsStatus == 'Processing') { $statusColor = '#FFFCDF'; } elseif ($smsStatus == 'Dispatched') { $statusColor = '#E8FFCF'; } elseif ($smsStatus == 'Failed') { $statusColor = '#FFE2AF'; } else { $statusColor = '#FFFFFF'; } return $statusColor; } }