address-line-1-column.php
2 years ago
address-line-2-column.php
2 years ago
city-column.php
2 years ago
country-column.php
2 years ago
export-csv-column.php
2 years ago
gateway-type-column.php
2 years ago
payer-email-column.php
2 years ago
payer-first-name-column.php
2 years ago
payer-last-name-column.php
2 years ago
payment-amount-column.php
2 years ago
payment-currency-column.php
2 years ago
postal-code-column.php
2 years ago
print-pdf-column.php
2 years ago
ship-full-name-column.php
2 years ago
state-column.php
2 years ago
export-csv-column.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Modules\Gateways\Meta_Boxes\Columns; |
| 5 | |
| 6 | use Jet_Form_Builder\Admin\Pages\Pages_Manager; |
| 7 | use Jet_Form_Builder\Exceptions\Repository_Exception; |
| 8 | use JFB_Modules\Gateways\Module; |
| 9 | |
| 10 | // If this file is called directly, abort. |
| 11 | if ( ! defined( 'WPINC' ) ) { |
| 12 | die; |
| 13 | } |
| 14 | |
| 15 | class Export_Csv_Column extends \JFB_Modules\Form_Record\Admin\View_Columns\Export_Csv_Column { |
| 16 | |
| 17 | /** |
| 18 | * @param array $record |
| 19 | * |
| 20 | * @return array |
| 21 | */ |
| 22 | public function get_value( array $record = array() ) { |
| 23 | $record_id = (int) $record['id']; |
| 24 | |
| 25 | return array( |
| 26 | 'text' => __( 'Export in CSV', 'jet-form-builder' ), |
| 27 | 'href' => Pages_Manager::instance()->get_action_url( |
| 28 | 'payments-export', |
| 29 | array( |
| 30 | 'id' => $record_id, |
| 31 | ) |
| 32 | ), |
| 33 | 'target' => '_blank', |
| 34 | 'type' => 'media-spreadsheet', |
| 35 | ); |
| 36 | } |
| 37 | } |
| 38 |