/** * Add a new video to the course. * * @param Course $course * @param array $videos */ public function addVideos(Course $course, array $videos) { foreach ($videos as $video) { $this->repository->addVideo($course, $video); \Resource::moveResource($course, $video); } }
/** * Add a new image to the course. * * @param Course $course * @param array $images * @return mixed */ public function addImages(Course $course, array $images) { foreach ($images as $image) { $this->repository->addImage($course, $image); \Resource::moveResource($course, $image); } return $this->getAllImages($course); }
/** * Add a new e-book for the course. * * @param Course $course * @param array $ebooks * @return bool */ public function addEbooks(Course $course, array $ebooks) { foreach ($ebooks as $ebook) { $this->repository->addEbook($course, $ebook); \Resource::moveResource($course, $ebook); } return true; }