Commit 102baa54 authored by Georgios Tsakalos's avatar Georgios Tsakalos
Browse files

update lab service interface and implement methods

parent 777b891d
......@@ -70,4 +70,24 @@ class LabService implements LabServiceInterface
return array_map([$this, 'export'], $labs);
public function getCourses(){
$courses = R::findAll('course');
return $courses;
public function getCoursesByLabId($id){
$lab = R::load('lab', $id);
$courses = $lab->sharedCourse;
return $courses;
private function getCoursesById(array $ids){
$courses = [];
foreach($ids as $id){
$course = R::load('course', $id);
$courses[] = $course;
return $courses;
......@@ -15,4 +15,7 @@ interface LabServiceInterface
public function updateLab(array $data, $id);
public function getLabById($id);
public function getLabsBySchoolId($id);
public function getCourses();
public function getCoursesByLabId($id);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment