function createWorkingUnit($task, $user, $effort) { $workingUnit = new WorkingUnit(); $workingUnit->setUser($user); $workingUnit->setEffortSpent($effort); return $workingUnit; }
public function executeShow(sfWebRequest $request) { $this->task = Doctrine::getTable('Task')->find(array($request->getParameter('id'))); $this->forward404Unless($this->task); $workingUnit = new WorkingUnit(); $workingUnit->setTaskId($this->task->getId()); $this->form = new WorkingUnitForm($workingUnit); }
public function removeWorkingUnit(WorkingUnit $workingUnit) { $i = $this->getWorkingUnitIndex($workingUnit->getId()); $this->WorkingUnits->remove($i); $this->save(); }