GravityKit\GravityMigrate\Platforms\FormidableForms\FormidableFormsExporter
Exports Gravity Forms forms to Formidable Forms.
Since: %ver%
Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:25
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Platforms\FormidableForms - Extends:
AbstractExporter
Properties
| Property | Type | Description |
|---|---|---|
$target_adapter | TargetAdapterInterface | null | Target adapter instance. |
Methods
| Method | Description |
|---|---|
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. |
resolved_product_field() | Reads a quantity's product list back as the ids Formidable assigned. |
Method Reference
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/FormidableForms/FormidableFormsExporter.php:51
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/FormidableForms/FormidableFormsExporter.php:78
get_target_adapter()
public function get_target_adapter(): TargetAdapterInterface
Returns target adapter.
Returns
TargetAdapterInterface
Since: %ver%
Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:197
resolved_product_field()
public static function resolved_product_field( array $product_field, array $created_field_ids ): array
Reads a quantity's product list back as the ids Formidable assigned.
Entries are written as strings because that is what Formidable itself writes -- duplication casts each one (FrmProField::switch_quantity_product_field_ids:190) and the settings screen posts them as checkbox values (quantity-options.php:15).
A value that is not a placeholder is left as it is rather than dropped: a round trip puts a real id back through restore_original_for_round_trip(), and rewriting it would break the link this method exists to keep.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$product_field | array | Whatever the field carries in product_field. | |
$created_field_ids | array | Field position to new Formidable field id. |
Returns
string[]— The product field ids, as Formidable stores them.
Since: %ver%
Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:420