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
| Method | Description |
|---|---|
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
| Name | Type | Default | Description |
|---|---|---|---|
$form_entry | array | JSON Schema for one entry of the forms array. | |
$extra_properties | array | [] | 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
| Name | Type | Default | Description |
|---|---|---|---|
$report | array | One entry per form that ran. | |
$skipped | array | The 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