Example #1
0
 /**
  * @access public
  * @global array $registry
  * @return render Template with Success or Failed Action delete of Employee
  */
 public function delete()
 {
     global $registry;
     if (isset($_GET['employee_id']) && !empty($_GET['employee_id'])) {
         $employee = new Employees();
         if ($employee->deleteEmployee($_GET['employee_id'])) {
             $this->registry['template']->data('desc', 'Employee deleted successfully');
             $this->registry['template']->render('header');
             $this->registry['template']->render('employee/success');
             $this->registry['template']->render('footer');
         } else {
             $this->failed();
         }
     }
 }