Class AdminPageFramework_FieldType_export
The Export field type let the user download arbitrary data.
Field Definition Arguments
Field Type Specific Arguments
- file_name - (optional, string) the file name to download.
- format - (optional, string) the format type.
array
,json
, ortext
is supported. Default:array
. - data - (optional, string|array|object ) the data to export.
Common Field Definition Arguments
For common field definition arguments, seeAdminPageFramework_Factory_Controller::addSettingField()
.
Example
array( 'field_id' => 'export_single', 'type' => 'export', 'description' => __( 'Download the saved option data.', 'admin-page-framework-loader' ), )
Export Custom Data
array( 'field_id' => 'export_custom_data', 'title' => __( 'Custom Exporting Data', 'admin-page-framework-loader' ), 'type' => 'export', 'data' => __( 'Hello World! This is custom export data.', 'admin-page-framework-loader' ), 'file_name' => 'hello_world.txt', 'label' => __( 'Export Custom Data', 'admin-page-framework-loader' ), 'description' => __( 'It is possible to set custom data to be downloaded. For that, use the #code#data#/code# argument in the field definition array.', 'admin-page-framework-loader' ), )
Package: AdminPageFramework\Common\Form\FieldType
Since: 2.1.5
Image: http://admin-page-framework.michaeluno.jp/image/common/form/field_type/export.png
Located at factory/_common/form/field_type/export/AdminPageFramework_FieldType_export.php
Since: 2.1.5
Image: http://admin-page-framework.michaeluno.jp/image/common/form/field_type/export.png
Located at factory/_common/form/field_type/export/AdminPageFramework_FieldType_export.php
Methods summary
Magic methods summary
Properties summary
public
array
|
$aFieldTypeSlugs |
#
Defines the field type slugs used for this field type. |
protected
array
|
$aDefaultKeys |
#
Defines the default key-values of this field type. Remark
$_aDefaultKeys holds shared default key-values defined in the base class.
|