public function saveAction() { $JobEntity = JobStorage::getNewEntity(); $Request = new Request(); $Request->processing($JobEntity); JobStorage::save($JobEntity->id, $JobEntity); Router::redirect('/job_get/' . $JobEntity->id); }
public function saveAction($jobId, $taskName) { $TaskEntity = TaskStorage::getNewEntity($taskName); $Request = new Request(); $Request->processing($TaskEntity); TaskStorage::save($TaskEntity->id, $TaskEntity); $JobEntity = JobStorage::getById($jobId); $JobEntity->tasks[] = $TaskEntity->id; JobStorage::save($jobId, $JobEntity); Router::redirect('/task_get/' . $TaskEntity->id); }