Skip to main content

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

PropertyTypeDescription
$backendstringThe identifier of the backend used for this entry.
$IDintThe ID for this entry.
$entrymixedThe backing entry.

Methods

MethodDescription
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

NameTypeDefaultDescription
$entry_idint | stringThe 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

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

NameTypeDefaultDescription
$view\GV\View | nullnullThe View context.
$request\GV\RequestnullThe Request (current if null).
$track_directorybooleantrueKeep 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

NameTypeDefaultDescription
$field\GV\FieldThe field to filter by.
$fallbackintnullA 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

NameTypeDefaultDescription
$view\GV\ViewThe View context.
$request\GV\RequestnullThe 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