GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Static Public Member Functions | Static Protected Attributes
GravityView_Fields Class Reference

Wanted to extend GF_Fields, but couldn't because static variables are inherited, so $_fields would always be GF results. More...

Static Public Member Functions

static create ( $properties)
 
static exists ( $field_name)
 Does the field exist (has it been registered)? More...
 
static get ( $field_name)
 Alias for get_instance() More...
 
static get_all ( $groups='')
 Get all fields. More...
 
static get_associated_field ( $gf_field)
 Alias for get_instance() More...
 
static get_instance ( $field_name)
 
static register ( $field)
 

Static Protected Attributes

static $_fields = array()
 

Detailed Description

Wanted to extend GF_Fields, but couldn't because static variables are inherited, so $_fields would always be GF results.

See also
GF_Fields

Definition at line 14 of file class-gravityview-fields.php.

Member Function Documentation

◆ create()

static create (   $properties)
static
Parameters
array$properties
Returns
GravityView_Field | bool

Definition at line 44 of file class-gravityview-fields.php.

References $class, and $field.

◆ exists()

static exists (   $field_name)
static

Does the field exist (has it been registered)?

Parameters
string$field_name
Returns
bool True: yes, it exists; False: nope

Definition at line 64 of file class-gravityview-fields.php.

◆ get()

static get (   $field_name)
static

Alias for get_instance()

Parameters
$field_name
Returns
GravityView_Field|false

Definition at line 84 of file class-gravityview-fields.php.

Referenced by GVCommon\is_field_numeric(), and GravityView_Render_Settings\render_field_options().

◆ get_all()

static get_all (   $groups = '')
static

Get all fields.

Since
1.16 Added $group parameter
Parameters
string | array$groupsOptional. If defined, fetch all fields in a group or array of groups.
Returns
GravityView_Field[]

Definition at line 117 of file class-gravityview-fields.php.

References $field.

Referenced by Request\_has_field_key(), GravityView_Admin_Views\get_available_fields(), GravityView_Admin_Views\get_entry_default_fields(), and GVCommon\get_form_fields().

◆ get_associated_field()

static get_associated_field (   $gf_field)
static

Alias for get_instance()

Parameters
string | GF_Field$gf_fieldGravity Forms field class or the class name type
Returns
GravityView_Field|false Returns false if no matching fields found

Definition at line 95 of file class-gravityview-fields.php.

References $field, and $gf_field.

Referenced by GravityView_Edit_Entry_Render\verify_user_can_edit_post().

◆ get_instance()

static get_instance (   $field_name)
static
Parameters
string$field_name
Returns
GravityView_Field|false

Definition at line 73 of file class-gravityview-fields.php.

Referenced by Internal_Field\by_id(), and GravityView_Admin_Views\set_default_view_fields().

◆ register()

static register (   $field)
static
Parameters
GravityView_Field$fieldField to register
Exceptions
ExceptionIf requirements aren't met
Returns
void

Definition at line 26 of file class-gravityview-fields.php.

References $field.

Referenced by GravityView_Field\__construct().

Field Documentation

◆ $_fields

$_fields = array()
staticprotected

Definition at line 17 of file class-gravityview-fields.php.


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