Example #1
0
function createWorkingUnit($task, $user, $effort)
{
    $workingUnit = new WorkingUnit();
    $workingUnit->setUser($user);
    $workingUnit->setEffortSpent($effort);
    return $workingUnit;
}
Example #2
0
 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);
 }
Example #3
0
 public function removeWorkingUnit(WorkingUnit $workingUnit)
 {
     $i = $this->getWorkingUnitIndex($workingUnit->getId());
     $this->WorkingUnits->remove($i);
     $this->save();
 }