Пример #1
0
 public function executeAddRow($request)
 {
     $this->backAction = $this->getContext()->getUser()->getFlash('actionName');
     $this->getContext()->getUser()->setFlash('actionName', $this->backAction);
     $startDate = $request->getParameter("startDate");
     $endDate = $request->getParameter("endDate");
     $employeeId = $request->getParameter("employeeId");
     $timesheetId = $request->getParameter("timesheetId");
     $noOfDays = $this->getTimesheetService()->dateDiff($startDate, $endDate);
     $values = array('date' => $startDate, 'employeeId' => $employeeId, 'timesheetId' => $timesheetId, 'noOfDays' => $noOfDays);
     $form = new TimesheetForm(array(), $values);
     $form->addRow($request->getParameter("num"), $values);
     return $this->renderPartial('addRow', array('form' => $form, 'num' => $request->getParameter("num"), 'noOfDays' => $noOfDays));
 }