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); }
public function onExport(ExportEvent $event) { $this->relativeRoot = $event->getRelativeRoot(); $this->parameters = $event->getParameters(); }