GravityKit\GravityMigrate\Schema\GfNotifications
Keys a set of notifications the way Gravity Forms stores them.
Gravity Forms keys notifications by each notification's own id and re-keys the array on
save. A notification with no id takes the empty key, so a second one overwrites the first
and the form silently ends up with one notification instead of two. Nothing errors: the
import reports success and the mail that is missing is only noticed when it fails to
arrive.
Since: %ver%
Source: src/Schema/GfNotifications.php:21
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Schema
Methods
| Method | Description |
|---|---|
key_by_id() | Assigns an id to each notification and keys the set by it. |
generate_id() | Returns a unique notification id in the shape Gravity Forms uses. |
Method Reference
key_by_id()
public static function key_by_id( array $notifications ): array
Assigns an id to each notification and keys the set by it.
Existing ids are preserved, so a form that already carries Gravity Forms notifications keeps them addressable.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$notifications | array | Notifications in any order or keying. |
Returns
array— Notifications keyed by id, each carrying its own id.
Since: %ver%
Source: src/Schema/GfNotifications.php:35
generate_id()
public static function generate_id(): string
Returns a unique notification id in the shape Gravity Forms uses.
Returns
string
Since: %ver%
Source: src/Schema/GfNotifications.php:63