GravityKit\GravityMigrate\Exporters\ExporterInterface
Describes the methods required for all external form exporters.
Since: %ver%
Source: src/Exporters/ExporterInterface.php:17
Details
- Kind:
interface - Namespace:
GravityKit\GravityMigrate\Exporters
Methods
| Method | Description |
|---|---|
get_slug() | Returns the unique slug used to reference the exporter. |
get_name() | Returns the human-readable exporter name. |
get_description() | Returns a short description of the exporter. |
is_available() | Whether the exporter can run on the current site (dependencies active, etc). |
list_forms() | Returns a list of exportable Gravity Forms forms. |
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. |
translate_merge_tags() | Converts Gravity Forms merge tags into provider-specific tokens. |
Method Reference
get_slug()
public function get_slug(): string
Returns the unique slug used to reference the exporter.
Returns
string
Since: %ver%
Source: src/Exporters/ExporterInterface.php:26
get_name()
public function get_name(): string
Returns the human-readable exporter name.
Returns
string
Since: %ver%
Source: src/Exporters/ExporterInterface.php:35
get_description()
public function get_description(): string
Returns a short description of the exporter.
Returns
string
Since: %ver%
Source: src/Exporters/ExporterInterface.php:44
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/Exporters/ExporterInterface.php:53
list_forms()
public function list_forms( array $args=[] ): array
Returns a list of exportable Gravity Forms forms.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$args | array | [] | Optional request arguments. |
Returns
array— Associative arrays carrying at leastidandtitle.
Since: %ver%
Source: src/Exporters/ExporterInterface.php:64
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/Exporters/ExporterInterface.php:76
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/Exporters/ExporterInterface.php:89
translate_merge_tags()
public function translate_merge_tags( string $text, array $context=[] ): string
Converts Gravity Forms merge tags into provider-specific tokens.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$text | string | Text containing Gravity Forms merge tags. | |
$context | array | [] | Optional context data for replacements. |
Returns
string
Since: %ver%
Source: src/Exporters/ExporterInterface.php:101