コード例 #1
0
ファイル: EmployeeMapper.php プロジェクト: NgoDucHai/Student
 /**
  * lay du lieu tu object tra ve mot mang
  * @param Employee_Model_Employee $employee
  * @return array
  */
 private function __getArrayFromObjectEmployee(Employee_Model_Employee $employee)
 {
     $data['employeeId'] = $employee->getEmployeeId();
     $data['employeeName'] = $employee->getEmployeeName();
     $data['dateOfBirth'] = $employee->getDateOfBirth();
     $data['gender'] = $employee->getGender();
     $data['facultyId'] = $employee->getFacultyId();
     $data['position'] = $employee->getPosition();
     $data['phone'] = $employee->getPhone();
     $data['address'] = $employee->getAddress();
     $data['role'] = $employee->getRole();
     $data['avatar'] = $employee->getAvatar();
     return $data;
 }
コード例 #2
0
 /**
  * Get information into form from request
  * @param Employee_Form_UpdateProfile $form
  * @param Employee_Model_Employee $result
  */
 protected function _processShowForm(Employee_Form_UpdateProfile $form, Employee_Model_Employee $result)
 {
     $form->populate(['employeeId' => $result->getEmployeeId(), 'employeeName' => $result->getEmployeeName(), 'dateOfBirth' => $result->getDateOfBirth(), 'gender' => $result->getGender(), 'facultyId' => $result->getFacultyId(), 'position' => $result->getPosition(), 'phone' => $result->getPhone(), 'address' => $result->getAddress(), 'role' => $result->getRole()]);
 }