/**
  * @DI\Observe("download_claroline_web_resource")
  *
  * @param DownloadResourceEvent $event
  */
 public function onDownload(DownloadResourceEvent $event)
 {
     $event->setItem($this->filesPath . $event->getResource()->getHashName());
     $event->stopPropagation();
 }
Exemple #2
0
 /**
  * @DI\Observe("download_file")
  *
  * @param DownloadResourceEvent $event
  */
 public function onDownload(DownloadResourceEvent $event)
 {
     $file = $event->getResource();
     $hash = $file->getHashName();
     $event->setItem($this->container->getParameter('claroline.param.files_directory') . DIRECTORY_SEPARATOR . $hash);
     $event->stopPropagation();
 }
 /**
  * @DI\Observe("download_cpasimusante_simuresource")
  *
  * @param DownloadResourceEvent $event
  */
 public function onDownload(DownloadResourceEvent $event)
 {
     $path = '/path/to/dledfile';
     $event->setItem($path);
     $event->stopPropagation();
 }