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

If this file is called directly, abort. More...

Inheritance diagram for Field_Collection:
Collection

Public Member Functions

 add ( $field)
 Add a to this collection. More...
 
 all ()
 Returns all the objects in this collection as an an array. More...
 
 by_position ( $position)
 Get a copy of this filtered by position. More...
 
 by_visible ( $view=null)
 Get a copy of this filtered by visibility to current user context. More...
 
 get ( $field_uid)
 Get a from this list by UID. More...
 
- Public Member Functions inherited from Collection
 add ( $value)
 Add an object to this collection. More...
 
 all ()
 Returns all the objects in this collection as an an array. More...
 
 clear ()
 Clear this collection. More...
 
 count ()
 Returns the count of the objects in this collection. More...
 
 first ()
 Get the first added object. More...
 
 last ()
 Get the last added object. More...
 
 merge (\GV\Collection $collection)
 Merge another collection into here. More...
 

Static Public Member Functions

static from_configuration ( $configuration)
 Parse a configuration array into a Field_Collection. More...
 

Detailed Description

If this file is called directly, abort.

A collection of objects.

Definition at line 12 of file class-gv-collection-field.php.

Member Function Documentation

◆ add()

add (   $field)

Add a to this collection.

Parameters
\GV\Field$fieldThe field to add to the internal array.
Since
2.0
Returns
void

Definition at line 34 of file class-gv-collection-field.php.

References $field, and gravityview().

◆ all()

all ( )

Returns all the objects in this collection as an an array.

Here for docBlock purposes only.

Since
2.0.13.1
Returns
[]

Definition at line 21 of file class-gv-collection-field.php.

◆ by_position()

by_position (   $position)

Get a copy of this filtered by position.

Parameters
string$positionThe position to get the fields for. Can be a wildcard *
Since
Returns
A filtered collection of , filtered by position.

Definition at line 72 of file class-gv-collection-field.php.

References $field.

◆ by_visible()

by_visible (   $view = null)

Get a copy of this filtered by visibility to current user context.

Since
Parameters
$viewThe view!
Returns
A filtered collection of , filtered by visibility.

$field

Definition at line 95 of file class-gv-collection-field.php.

References $field.

◆ from_configuration()

static from_configuration (   $configuration)
static

Parse a configuration array into a Field_Collection.

Parameters
array$configurationThe configuration, structured like so:

array(

[other zones]

'directory_list-title' => array(

[other fields]

'5372653f25d44' => array(
    @see \GV\Field::as_configuration() for structure
)

    [other fields]

)

[other zones] )

Returns
A collection of fields.

Definition at line 132 of file class-gv-collection-field.php.

References $field.

◆ get()

get (   $field_uid)

Get a from this list by UID.

Parameters
int$field_uidThe UID of the field in the field to get.
Since
2.0
Returns
|null The with the $field_uid as the UID, or null if not found.

Definition at line 52 of file class-gv-collection-field.php.

References $field.


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