GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Private Member Functions
GravityView_Edit_Entry Class Reference

Public Member Functions

 __construct ()
 
 add_template_path ($file_paths)
 Include this extension templates path. More...
 
 modify_field_blacklist ($fields=array(), $context=NULL)
 Edit mode doesn't allow certain field types. More...
 

Static Public Member Functions

static check_user_cap_edit_entry ($entry, $view_id=0)
 checks if user has permissions to edit a specific entry More...
 
static get_edit_link ($entry, $view_id, $post_id=null, $field_values= '')
 The edit entry link creates a secure link with a nonce. More...
 
static get_nonce_key ($view_id, $form_id, $entry_id)
 Return a well formatted nonce key according to GravityView Edit Entry protocol. More...
 
static getInstance ()
 

Data Fields

 $instances = array()
 

Static Public Attributes

static $file
 
static $instance
 

Private Member Functions

 add_hooks ()
 
 addon_specific_hooks ()
 Trigger hooks that are normally run in the admin for Addons, but need to be triggered manually because we're not in the admin. More...
 
 load_components ($component)
 

Detailed Description

Definition at line 19 of file class-edit-entry.php.

Constructor & Destructor Documentation

__construct ( )

Definition at line 35 of file class-edit-entry.php.

References add_hooks(), addon_specific_hooks(), and load_components().

Member Function Documentation

add_hooks ( )
private

Definition at line 81 of file class-edit-entry.php.

Referenced by __construct().

add_template_path (   $file_paths)

Include this extension templates path.

Parameters
array$file_pathsList of template paths ordered

Definition at line 112 of file class-edit-entry.php.

addon_specific_hooks ( )
private

Trigger hooks that are normally run in the admin for Addons, but need to be triggered manually because we're not in the admin.

Returns
void

Definition at line 100 of file class-edit-entry.php.

Referenced by __construct().

static check_user_cap_edit_entry (   $entry,
  $view_id = 0 
)
static

checks if user has permissions to edit a specific entry

Needs to be used combined with GravityView_Edit_Entry::user_can_edit_entry for maximum security!!

Parameters
array$entryGravity Forms entry array
int$view_idID of the view you want to check visibility against {
Since
1.9.2}
Returns
bool
Runs Filter:
gravityview/edit_entry/user_can_edit_entry Modify whether user can edit an entry.
Since
1.15 Added $entry and $view_id parameters
Parameters
[in,out]boolean$user_can_editCan the current user edit the current entry? (Default: false)
[in]array$entryGravity Forms entry array {
Since
1.15}
Parameters
[in]int$view_idID of the view you want to check visibility against {
Since
1.15}

Definition at line 221 of file class-edit-entry.php.

References $entry, $view_id, GVCommon\get_template_setting(), getInstance(), GravityView_View\getInstance(), and GVCommon\has_cap().

Referenced by GravityView_Entry_Link_Shortcode\has_cap(), and GravityView_Edit_Entry_Render\user_can_edit_entry().

static get_edit_link (   $entry,
  $view_id,
  $post_id = null,
  $field_values = '' 
)
static

The edit entry link creates a secure link with a nonce.

It also mimics the URL structure Gravity Forms expects to have so that it formats the display of the edit form like it does in the backend, like "You can edit this post from the post page" fields, for example.

Parameters
$entryarray Gravity Forms entry object
$view_idint GravityView view id
$post_idint GravityView Post ID where View may be embedded {
Since
1.9.2}
Parameters
string | array$field_valuesParameters to pass in to the Edit Entry form to prefill data. Uses the same format as Gravity Forms "Allow field to be populated dynamically" {
Since
1.9.2} {
See also
https://www.gravityhelp.com/documentation/article/allow-field-to-be-populated-dynamically/ }
Returns
string

Allow passing params to dynamically populate entry with values

Since
1.9.2

Definition at line 147 of file class-edit-entry.php.

References $entry, $url, $view_id, and gv_entry_link().

Referenced by GravityView_Entry_Link_Shortcode\get_url().

static get_nonce_key (   $view_id,
  $form_id,
  $entry_id 
)
static

Return a well formatted nonce key according to GravityView Edit Entry protocol.

Parameters
$view_idint GravityView view id
$form_idint Gravity Forms form id
$entry_idint Gravity Forms entry id
Returns
string

Definition at line 129 of file class-edit-entry.php.

References $form_id, and $view_id.

Referenced by GravityView_Edit_Entry_Render\setup_vars().

static getInstance ( )
static
load_components (   $component)
private

Definition at line 66 of file class-edit-entry.php.

Referenced by __construct().

modify_field_blacklist (   $fields = array(),
  $context = NULL 
)

Edit mode doesn't allow certain field types.

Parameters
array$fieldsExisting blacklist fields
string | null$contextContext
Returns
array If not edit context, original field blacklist. Otherwise, blacklist including post fields.

Definition at line 185 of file class-edit-entry.php.

Field Documentation

$file
static
$instance
static

Definition at line 26 of file class-edit-entry.php.

$instances = array()

Definition at line 32 of file class-edit-entry.php.


The documentation for this class was generated from the following file: