GravityKit\GravityMigrate\Exporters\ExportTracker
Stores which Gravity Forms form became which form in the other plugin, so a form already sent
somewhere is recognised rather than sent twice.
Since: %ver%
Source: src/Exporters/ExportTracker.php:21
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Exporters
Methods
| Method | Description |
|---|---|
record_export() | Records the relationship between a Gravity Forms form and an exported form. |
find_target_form_id() | Returns the target form ID for a given Gravity Forms form. |
find_source_form_id() | Returns the Gravity Forms form ID for an exported form. |
has_been_exported() | Checks if a form has been exported to a specific provider. |
remove_export() | Removes stored export mapping for a form. |
get_exports() | Returns all stored exports. |
clear() | Clears all stored exports. |
get_exports_for_provider() | Gets all exports for a specific provider. |
find_provider_for_target() | Returns the provider slug for a given target form ID. |
Method Reference
record_export()
public function record_export( string $provider_slug, int $source_form_id, $target_form_id, array $metadata=[] ): void
Records the relationship between a Gravity Forms form and an exported form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug (e.g., 'wpforms'). | |
$source_form_id | int | Gravity Forms form ID. | |
$target_form_id | string | int | Exported form identifier. | |
$metadata | array | [] | Optional metadata (e.g., transformation log). |
Returns
void
Since: %ver%
Source: src/Exporters/ExportTracker.php:61
find_target_form_id()
public function find_target_form_id( string $provider_slug, int $source_form_id )
Returns the target form ID for a given Gravity Forms form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug. | |
$source_form_id | int | Gravity Forms form ID. |
Returns
string|int|null
Since: %ver%
Source: src/Exporters/ExportTracker.php:93
find_source_form_id()
public function find_source_form_id( string $provider_slug, $target_form_id ): ?int
Returns the Gravity Forms form ID for an exported form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug. | |
$target_form_id | string | int | Target form identifier. |
Returns
int|null
Since: %ver%
Source: src/Exporters/ExportTracker.php:113
has_been_exported()
public function has_been_exported( string $provider_slug, int $source_form_id ): bool
Checks if a form has been exported to a specific provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug. | |
$source_form_id | int | Gravity Forms form ID. |
Returns
bool
Since: %ver%
Source: src/Exporters/ExportTracker.php:133
remove_export()
public function remove_export( string $provider_slug, int $source_form_id ): void
Removes stored export mapping for a form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug. | |
$source_form_id | int | Gravity Forms form ID. |
Returns
void
Since: %ver%
Source: src/Exporters/ExportTracker.php:149
get_exports()
public function get_exports(): array
Returns all stored exports.
Returns
array
Since: %ver%
Source: src/Exporters/ExportTracker.php:176
clear()
public function clear(): void
Clears all stored exports.
Returns
void
Since: %ver%
Source: src/Exporters/ExportTracker.php:218
get_exports_for_provider()
public function get_exports_for_provider( string $provider_slug ): array
Gets all exports for a specific provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$provider_slug | string | Exporter slug. |
Returns
array
Since: %ver%
Source: src/Exporters/ExportTracker.php:233
find_provider_for_target()
public function find_provider_for_target( $target_form_id ): ?string
Returns the provider slug for a given target form ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$target_form_id | string | int | Target form identifier. |
Returns
string|null
Since: %ver%
Source: src/Exporters/ExportTracker.php:248