public function remove($id = null) { if ($id != null) { //Confirm entry for user $timeEntry = new timeEntryModel($id); if ($timeEntry->getId() !== NULL) { //Remove Entry if ($timeEntry->remove($timeEntry->getId())) { $this->view->message = "<i class=\"fa fa-check\"></i> Removed successfully."; } else { $this->view->message = "ERROR: Cannot remove entry."; } } else { header("location: " . $this->_link(array('timesheet')) . ""); } } else { header("location: " . $this->_link(array('timesheet')) . ""); } }