GravityKit\GravityMigrate\Platforms\WPForms\WPFormsExporter
Exports Gravity Forms forms to WPForms.
Since: %ver%
Source: src/Platforms/WPForms/WPFormsExporter.php:21
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Platforms\WPForms - Extends:
AbstractExporter
Properties
| Property | Type | Description |
|---|---|---|
$target_adapter | TargetAdapterInterface | null | Target adapter instance. |
$wpforms_form_handler | \WPForms_Form_Handler | null | Cached WPForms form handler. |
Methods
| Method | Description |
|---|---|
is_available() | Whether the exporter can run on the current site (dependencies active, etc). |
analyze_form() | Reports what the requested Gravity Forms form loses on the way to the target provider. |
export_form() | Exports a Gravity Forms form to the target provider. |
get_target_adapter() | Returns target adapter. |
Method Reference
is_available()
public function is_available(): bool
Whether the exporter can run on the current site (dependencies active, etc).
Returns
bool
Since: %ver%
Source: src/Platforms/WPForms/WPFormsExporter.php:55
analyze_form()
public function analyze_form( $form_id, array $args=[] )
Reports what the requested Gravity Forms form loses on the way to the target provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | mixed | Gravity Forms form identifier. | |
$args | array | [] | Optional request arguments. |
Returns
array| WP_Error — Field notices and warnings, or WP_Error when the form cannot be read.
Since: %ver%
Source: src/Platforms/WPForms/WPFormsExporter.php:62
export_form()
public function export_form( $form_id, array $args=[] )
Exports a Gravity Forms form to the target provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | mixed | Gravity Forms form identifier. | |
$args | array | [] | Optional request arguments. |
Returns
array| WP_Error —target_form_id,edit_urlandissuesfor the created form, or WP_Error describing the failure.
Since: %ver%
Source: src/Platforms/WPForms/WPFormsExporter.php:89
get_target_adapter()
public function get_target_adapter(): TargetAdapterInterface
Returns target adapter.
Returns
TargetAdapterInterface
Since: %ver%
Source: src/Platforms/WPForms/WPFormsExporter.php:213