GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Static Public Member Functions
GravityView_GFFormsModel Class Reference

Make some GFFormsModel public available. More...

Inheritance diagram for GravityView_GFFormsModel:

Static Public Member Functions

static copy_post_image ($url, $post_id)
 Copied function from Gravity Forms plugin ::copy_post_image since the method is private. More...
 
static get_post_field_images ($form, $entry)
 Given information provided in an entry, get array of media IDs. More...
 
static get_post_fields ($form, $entry)
 Alias of GFFormsModel::get_post_fields(); just making it public. More...
 
static media_handle_upload ($url, $post_id, $post_data=array())
 Copied function from Gravity Forms plugin ::media_handle_upload since the method is private. More...
 

Detailed Description

Make some GFFormsModel public available.

Since
1.16.2

Definition at line 8 of file class-gravityview-gfformsmodel.php.

Member Function Documentation

static copy_post_image (   $url,
  $post_id 
)
static

Copied function from Gravity Forms plugin ::copy_post_image since the method is private.

Since
1.16.2
Parameters
string$urlURL of the post image to update
int$post_idID of the post image to update
Returns
array|bool Array with file, url and type keys. False: failed to copy file to final directory path.

If the method changes to public, use Gravity Forms' method

Definition at line 86 of file class-gravityview-gfformsmodel.php.

References $url.

static get_post_field_images (   $form,
  $entry 
)
static

Given information provided in an entry, get array of media IDs.

This is necessary because GF doesn't expect to need to update post images, only to create them.

See also
GFFormsModel::create_post()
Since
1.17
Parameters
array$formGravity Forms form array
array$entryGravity Forms entry array
Returns
array Array of "Field ID" => "Media IDs"

Definition at line 24 of file class-gravityview-gfformsmodel.php.

References $entry, and $form.

Referenced by GravityView_Edit_Entry_Render\fill_post_template().

static get_post_fields (   $form,
  $entry 
)
static

Alias of GFFormsModel::get_post_fields(); just making it public.

See also
GFFormsModel::get_post_fields()
Since
1.17
Parameters
array$formGravity Forms form array
array$entryGravity Forms entry array
Returns
array

If the method changes to public, use Gravity Forms' method

Definition at line 59 of file class-gravityview-gfformsmodel.php.

References $entry, and $form.

static media_handle_upload (   $url,
  $post_id,
  $post_data = array() 
)
static

Copied function from Gravity Forms plugin ::media_handle_upload since the method is private.

Note: The method became public in GF 1.9.17.7

See also
GFFormsModel::media_handle_upload
GravityView_Edit_Entry_Render::maybe_update_post_fields

copy_post_image wp_insert_attachment wp_update_attachment_metadata

Parameters
string$urlURL of the post image to update
int$post_idID of the post image to update
array$post_dataArray of data for the eventual attachment post type that is created using {
See also
wp_insert_attachment}. Supports post_mime_type, guid, post_parent, post_title, post_content keys.
Returns
bool|int ID of attachment Post created. Returns false if file not created by copy_post_image

If the method changes to public, use Gravity Forms' method

Definition at line 121 of file class-gravityview-gfformsmodel.php.

References $url.

Referenced by GravityView_Edit_Entry_Render\update_post_image().


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