Exemple #1
0
 private function _saveEmployeeWorkShift($workShiftId, $empArray)
 {
     for ($i = 0; $i < sizeof($empArray); $i++) {
         $empWorkShift = new EmployeeWorkShift();
         $empWorkShift->setWorkShiftId($workShiftId);
         $empWorkShift->setEmpNumber($empArray[$i]);
         $empWorkShift->save();
     }
 }
Exemple #2
0
 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);
 }