Skip to main content

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

PropertyTypeDescription
$target_adapterTargetAdapterInterface | nullTarget adapter instance.
$wpforms_form_handler\WPForms_Form_Handler | nullCached WPForms form handler.

Methods

MethodDescription
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

NameTypeDefaultDescription
$form_idmixedGravity Forms form identifier.
$argsarray[]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

NameTypeDefaultDescription
$form_idmixedGravity Forms form identifier.
$argsarray[]Optional request arguments.

Returns

  • array | WP_Errortarget_form_id, edit_url and issues for 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