Skip to main content

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

MethodDescription
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

NameTypeDefaultDescription
$provider_slugstringExporter slug (e.g., 'wpforms').
$source_form_idintGravity Forms form ID.
$target_form_idstring | intExported form identifier.
$metadataarray[]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

NameTypeDefaultDescription
$provider_slugstringExporter slug.
$source_form_idintGravity 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

NameTypeDefaultDescription
$provider_slugstringExporter slug.
$target_form_idstring | intTarget 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

NameTypeDefaultDescription
$provider_slugstringExporter slug.
$source_form_idintGravity 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

NameTypeDefaultDescription
$provider_slugstringExporter slug.
$source_form_idintGravity 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

NameTypeDefaultDescription
$provider_slugstringExporter 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

NameTypeDefaultDescription
$target_form_idstring | intTarget form identifier.

Returns

  • string | null

Since: %ver%

Source: src/Exporters/ExportTracker.php:248