Exemple #1
0
 public function export($model, $template, array $params)
 {
     $url = $this->getUrl($model, $params);
     $params['webroot'] = ExportEvent::getRelativeRootUrl($url);
     if ($this->dispatcher) {
         $this->dispatcher->dispatch('export', new ExportEvent($url, $model, $params));
     }
     $content = $this->render($template, $params);
     $this->store->store($url, $content);
 }
Exemple #2
0
 public function onExport(ExportEvent $event)
 {
     $this->relativeRoot = $event->getRelativeRoot();
     $this->parameters = $event->getParameters();
 }