Пример #1
0
 /**
  * set default avatar if avatar null
  * @param \Employee_Model_Employee $employee
  */
 private function __setDefaultAvatar(Employee_Model_Employee $employee)
 {
     if ($employee->getAvatar() === NULL) {
         $avatar = realpath(APPLICATION_PATH . '/../public/images/avatar/avatarDefault.png');
         $employee->setAvatar($avatar);
     }
 }
Пример #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()]);
 }