GV\Entry
The base \GV\Entry class.
Contains all entry data and some processing and logic rules.
Source: future/includes/class-gv-entry.php:14
Details
- Kind:
class - Namespace:
GV
Properties
| Property | Type | Description |
|---|---|---|
$backend | string | The identifier of the backend used for this entry. |
$ID | int | The ID for this entry. |
$entry | mixed | The backing entry. |
Methods
| Method | Description |
|---|---|
by_id() | Construct a \GV\Entry instance by ID. |
as_entry() | Return the backing entry object. |
get_permalink() | Return the link to this entry in the supplied context. |
is_multi() | Is this a multi-entry (joined entry). |
from_field() | If this is a Multi_Entry filter it by Field |
check_access() | Check if the current user can access the entry. |
Method Reference
by_id()
public static function by_id( $entry_id )
Construct a \GV\Entry instance by ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry_id | int | string | The internal entry ID. |
Returns
- \GV\Entry |
null— An instance of this entry or null if not found.
Since: 2.0
Source: future/includes/class-gv-entry.php:85
as_entry()
public function as_entry()
Return the backing entry object.
Returns
array— The backing entry object.
Source: future/includes/class-gv-entry.php:94
get_permalink()
public function get_permalink( \GV\View $view=null, \GV\Request $request=null, $track_directory=true )
Return the link to this entry in the supplied context.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$view | \GV\View | null | null | The View context. |
$request | \GV\Request | null | The Request (current if null). |
$track_directory | boolean | true | Keep the housing directory arguments intact (used for breadcrumbs, for example). Default: true. |
Returns
string— The permalink to this entry.
Since: 2.0
Source: future/includes/class-gv-entry.php:110
is_multi()
public function is_multi()
Is this a multi-entry (joined entry).
Returns
boolean
Since: 2.2
Source: future/includes/class-gv-entry.php:258
from_field()
public function from_field( $field, $fallback=null )
If this is a Multi_Entry filter it by Field
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field | \GV\Field | The field to filter by. | |
$fallback | int | null | A fallback form_id if the field supplied is invalid. |
Returns
- \GV\Entry |
null— A \GV\Entry or null if not found.
Since: 2.2
Source: future/includes/class-gv-entry.php:272
check_access()
public function check_access( \GV\View $view, $request=null )
Check if the current user can access the entry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$view | \GV\View | The View context. | |
$request | \GV\Request | null | The request context. |
Returns
bool|\WP_Error— True if allowed, WP_Error if denied.
Since: 2.29.0
Source: future/includes/class-gv-entry.php:289