_getFormInstance('export', $options); return $form; } /** * @return View */ protected function _doExportForm() { $form = $this->_getExportForm(); $this->_addFormItem($form); return $this; } /** * @return null */ protected function _doExportAjax() { $form = $this->_getExportForm(); $this->_displayJson($form->validateAjax()); } /** * @return View */ protected function _doExport() { $form = $this->_getExportForm(); if ($form->validate()) { $data = $form->getValues(); sort($data['pages']); header('Content-Type: application/x-sql; charset=utf-8'); header('Content-Disposition: attachment; filename="pages-' . implode('-', $data['pages']) . '.sql"'); $this->_getDataObj()->dumpSql($data); exit; } $this->_addFormItem($form); return $this; } }