protected function compile() { $intMemberId = $this->getMemberId(); if (\Input::post('export')) { $objConfig = ExporterModel::findById($this->exporterConfig); if ($objConfig == null) { return; } switch (\Input::post('export')) { case EXPORTER_FILE_TYPE_CSV: $objExporter = new CsvExporter($objConfig); break; case EXPORTER_FILE_TYPE_MEDIA: $objExporter = new MediaExporter($objConfig); break; case EXPORTER_FILE_TYPE_PDF: $objExporter = new PdfExporter($objConfig); break; case EXPORTER_FILE_TYPE_XLS: $objExporter = new XlsExporter($objConfig); break; } if ($objExporter) { $objExporter->export($this->exporterExportType, $intMemberId); } } $this->Template->action = ''; $this->Template->method = 'POST'; $this->Template->noRights = $intMemberId ? false : true; $this->Template->btnLabel = $this->exporterBtnLabel; }