コード例 #1
0
ファイル: WorkShiftForm.php プロジェクト: rabbitdigital/HRM
 private function _saveEmployeeWorkShift($workShiftId, $empArray)
 {
     for ($i = 0; $i < sizeof($empArray); $i++) {
         $empWorkShift = new EmployeeWorkShift();
         $empWorkShift->setWorkShiftId($workShiftId);
         $empWorkShift->setEmpNumber($empArray[$i]);
         $empWorkShift->save();
     }
 }
コード例 #2
0
ファイル: WorkShiftForm.php プロジェクト: THM068/orangehrm
 private function _saveEmployeeWorkShift($workShiftId, $empArray)
 {
     $empWorkShiftCollection = new Doctrine_Collection('EmployeeWorkShift');
     for ($i = 0; $i < sizeof($empArray); $i++) {
         $empWorkShift = new EmployeeWorkShift();
         $empWorkShift->setWorkShiftId($workShiftId);
         $empWorkShift->setEmpNumber($empArray[$i]);
         $empWorkShiftCollection->add($empWorkShift);
     }
     $this->getWorkShiftService()->saveEmployeeWorkShiftCollection($empWorkShiftCollection);
 }