dbe = $dbe; $this->downloader = $downloader; } /** * @return string */ public function get_page_title() { return esc_html__( 'Backup Database', 'search-and-replace' ); } /** * Return the static slug string. * * @return string */ public function get_slug() { return 'backup-database'; } /** *shows the page template */ public function render() { require_once( __DIR__ . '/../templates/db_backup.php' ); } /** * @return string */ protected function get_submit_button_title() { return esc_html__( 'Create SQL File', 'search-and-replace' ); } /** * event handler for click on export sql button */ public function save() { $report = $this->dbe->db_backup(); $this->downloader->show_modal( $report ); return TRUE; } }