Skip to main content

GravityKit\GravityMigrate\Abilities\ReportSchema

One description of the report both migration abilities return.

ExternalMigration::migrate() returns the same entries whether it wrote anything or not; the two abilities differ only in the status values they can produce and whether a written form is named. The common part is declared once so both schemas describe that array the same way.

Since: %ver%

Source: src/Abilities/ReportSchema.php:22

Details​

  • Kind: class
  • Namespace: GravityKit\GravityMigrate\Abilities

Methods​

MethodDescription
envelope()The envelope both abilities return, wrapped around one form entry's schema.
skipped_property()The skipped list both abilities return when skip_already_migrated is set.
outcome()How the call ended, counting a skipped form as done: it was migrated by an earlier run.
shared_form_properties()The properties every form entry carries, whichever ability produced it.
field_rows()One row per source field: what it was, what it became, what happened to it.

Method Reference​

envelope()​

public static function envelope( array $form_entry, array $extra_properties=[] ): array

The envelope both abilities return, wrapped around one form entry's schema.

Parameters​

NameTypeDefaultDescription
$form_entryarrayJSON Schema for one entry of the forms array.
$extra_propertiesarray[]Top-level properties only one ability returns.

Returns​

  • array

Since: %ver%

Source: src/Abilities/ReportSchema.php:34

skipped_property()​

public static function skipped_property(): array

The skipped list both abilities return when skip_already_migrated is set.

Returns​

  • array

Since: 2.1.1

Source: src/Abilities/ReportSchema.php:65

outcome()​

public static function outcome( array $report, array $skipped ): string

How the call ended, counting a skipped form as done: it was migrated by an earlier run.

So every form skipped is a success, and a skipped form beside forms that all failed makes the call partial rather than failed.

Parameters​

NameTypeDefaultDescription
$reportarrayOne entry per form that ran.
$skippedarrayThe forms left out.

Returns​

  • string

Since: 2.1.1

Source: src/Abilities/ReportSchema.php:102

shared_form_properties()​

public static function shared_form_properties(): array

The properties every form entry carries, whichever ability produced it.

Returns​

  • array

Since: %ver%

Source: src/Abilities/ReportSchema.php:136

field_rows()​

public static function field_rows(): array

One row per source field: what it was, what it became, what happened to it.

Returns​

  • array

Since: %ver%

Source: src/Abilities/ReportSchema.php:172