}
     }
     if (isset($_REQUEST['pageNO'])) {
         $pageNO = $_REQUEST['pageNO'];
     } else {
         $pageNO = 1;
     }
     $leaveController->setId($id);
     $leaveController->setLeaveTypeId($leaveTypeId);
     $leaveController->editLeaves("summary", $year, $searchBy, $sortBy, $sortOrder, $pageNO);
     break;
 case 'Leave_Quota_Copy_Last_Year':
     $leaveController->copyLeaveQuotaFromLastYear($_GET['currYear']);
     break;
 case 'Leave_Brought_Forward_Copy_Last_Year':
     $leaveController->copyLeaveBroughtForwardFromLastYear(date('Y'));
     break;
 case 'Leave_Quota_Save':
     $objs = $leaveQuotaExtractor->parseEditData($_POST);
     $mes = "Empty record";
     if (isset($objs)) {
         foreach ($objs as $obj) {
             $leaveController->setObjLeave($obj);
             $mes = $leaveController->saveLeaveQuota();
         }
     }
     $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : $_SESSION['empID'];
     $year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date('Y');
     $leaveTypeId = isset($_REQUEST['leaveTypeId']) ? $_REQUEST['leaveTypeId'] : LeaveQuota::LEAVEQUOTA_CRITERIA_ALL;
     $searchBy = isset($_REQUEST['searchBy']) ? $_REQUEST['searchBy'] : "employee";
     $sortBy = isset($_REQUEST['sortField']) ? $_REQUEST['sortField'] : null;