From e66a2510caaa29a048c2fbaf7d0db54b71c626e4 Mon Sep 17 00:00:00 2001 From: Yann ASTIER Date: Thu, 24 Oct 2024 23:58:15 +0200 Subject: [PATCH] Finished RelationService.php --- src/Controller/DashboardController.php | 2 + src/Service/RelationService.php | 60 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/Controller/DashboardController.php b/src/Controller/DashboardController.php index e93d322..dead06a 100644 --- a/src/Controller/DashboardController.php +++ b/src/Controller/DashboardController.php @@ -14,4 +14,6 @@ class DashboardController extends AbstractController { return $this->render('dashboard/index.html.twig'); } + + } diff --git a/src/Service/RelationService.php b/src/Service/RelationService.php index b3d9bbc..223b5df 100644 --- a/src/Service/RelationService.php +++ b/src/Service/RelationService.php @@ -1 +1,61 @@ setEmployee($employee); + $assignment->setRide($ride); + $assignment->setStartHour($startHour); + $assignment->setEndHour($endHour); + } + + public function setEmployeeSkill(Skill $skill, Employee $employee ) + { + $employeeSkill = new EmployeeSkill(); + + $employeeSkill->setEmployee($employee); + $employeeSkill->setSkill($skill); + } + + public function setMissionCategory(Mission $mission, Category $category ) + { + $missionCategory = new MissionCategory(); + + $missionCategory->setMission($mission); + $missionCategory->setCategory($category); + } + + public function setRepresentation(Ride $ride, Employee $employee,int $count ,\DateTime $date ) + { + $representation = new Representation(); + + $representation->setRide($ride); + $representation->setEmployee($employee); + $representation->setCount($count); + $representation->setDate($date); + } + + public function setRequirement(Skill $skill, Mission $mission ) + { + $requirement = new Requirement(); + + $requirement->setSkill($skill); + $requirement->setMission($mission); + } +}