| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentForm\App\Modules\Entries; |
| 4 |
|
| 5 |
use FluentForm\App\Services\Transfer\TransferService; |
| 6 |
use FluentForm\Framework\Foundation\Application; |
| 7 |
|
| 8 |
/** |
| 9 |
* @deprecated Use TransferService::exportEntries() instead. |
| 10 |
* @todo Remove in next major version. |
| 11 |
*/ |
| 12 |
class Export |
| 13 |
{ |
| 14 |
protected $app; |
| 15 |
protected $request; |
| 16 |
protected $tableName; |
| 17 |
|
| 18 |
public function __construct(Application $application, $tableName = 'fluentform_submissions') |
| 19 |
{ |
| 20 |
$this->app = $application; |
| 21 |
$this->request = $application->request; |
| 22 |
$this->tableName = $tableName; |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* @deprecated Use TransferService::exportEntries() instead. |
| 27 |
*/ |
| 28 |
public function index() |
| 29 |
{ |
| 30 |
|
| 31 |
$args = $this->request->get(); |
| 32 |
|
| 33 |
if ($this->tableName !== 'fluentform_submissions') { |
| 34 |
$args['table'] = $this->tableName; |
| 35 |
} |
| 36 |
|
| 37 |
TransferService::exportEntries($args); |
| 38 |
} |
| 39 |
} |
| 40 |
|