Exemplo n.º 1
0
 /**
  * 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);
     }
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 /**
  * 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;
 }