GravityKit\GravityView\Entry\EntryGravityForms
The Gravity Forms Entry class implementation.
Accessible as an array for back-compatibility.
Since:
2.03.0.0(Migrated to GravityKit\GravityView\Entry namespace.)
Source: src/Entry/EntryGravityForms.php:24
Details
- Kind:
class - Namespace:
GravityKit\GravityView\Entry - Extends:
Entry - Implements:
ArrayAccess
Properties
| Property | Type | Description |
|---|---|---|
$backend | string | The identifier of the backend used for this entry. |
$slug | string | The entry slug. |
Methods
| Method | Description |
|---|---|
by_id() | Construct a \GV\Entry instance by ID. |
by_slug() | Construct a \GV\Entry instance by slug name. |
from_entry() | Construct a \GV\Entry instance from a Gravity Forms entry array. |
Method Reference
by_id()
public static function by_id( $entry_id, $form_id=0 )
Construct a \GV\Entry instance by ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry_id | int | string | The internal entry ID. | |
$form_id | int | 0 | The form ID, since slugs can be non-unique. Default: 0. |
Returns
\GV\GF_Entry|null— An instance of this entry or null if not found.
Since: 2.0
Source: src/Entry/EntryGravityForms.php:59
by_slug()
public static function by_slug( $entry_slug, $form_id=0 )
Construct a \GV\Entry instance by slug name.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry_slug | int | string | The registered slug for the entry. | |
$form_id | int | 0 | The form ID, since slugs can be non-unique. Default: 0. |
Returns
\GV\GF_Entry|null— An instance of this entry or null if not found.
Since: 2.0
Source: src/Entry/EntryGravityForms.php:97
from_entry()
public static function from_entry( $entry )
Construct a \GV\Entry instance from a Gravity Forms entry array.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry | array | The entry array |
Returns
\GV\GF_Entry|null— An instance of this entry or null if not found.
Source: src/Entry/EntryGravityForms.php:132