function settings() { $return = parent::settings(); if ($this->getParam('type') == 'set') { //save settings require_once $this->getApplicationPath() . '/application/DB.php'; require_once $this->getApplicationPath() . '/application/models/CopyExportImport.php'; $generator = \Application\models\CopyGenerator::factory(); $generator->generate(); } return $return; }
/** * generate copy file */ public function generateAction() { $this->setNoRender(); if (!$this->view->userIsAdmin) { throw new Exception("User must be an admin"); } $generator = CopyGenerator::factory(); $generator->generate(); return 'success'; // $copyExportImport->generate(); }
public static function copyData($locale = 'en_US') { require_once APPLICATION_PATH . '/models/CopyExportImport.php'; $url = \Application\models\CopyGenerator::factory()->getCopyUrl($locale); echo H::js($url); }