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

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

Inheritance diagram for Widget_Collection:
Collection

Public Member Functions

 add ( $widget)
 Add a to this collection. More...
 
 by_id ( $id)
 Get a copy of this filtered by ID. More...
 
 by_position ( $position)
 Get a copy of this filtered by position. More...
 
 get ( $widget_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 Widget_Collection. More...
 

Detailed Description

If this file is called directly, abort.

A collection of objects.

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

Member Function Documentation

◆ add()

add (   $widget)

Add a to this collection.

Parameters
\GV\Widget$widgetThe widget to add to the internal array.
Since
2.0
Returns
void

Definition at line 22 of file class-gv-collection-widget.php.

References gravityview().

◆ by_id()

by_id (   $id)

Get a copy of this filtered by ID.

Parameters
string$idThe IDs to get the widgets for.
Since
Returns
A filtered collection of , filtered by ID.

Definition at line 83 of file class-gv-collection-widget.php.

◆ by_position()

by_position (   $position)

Get a copy of this filtered by position.

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

Definition at line 60 of file class-gv-collection-widget.php.

◆ from_configuration()

static from_configuration (   $configuration)
static

Parse a configuration array into a Widget_Collection.

Parameters
array$configurationThe configuration, structured like so:

array(

[other zones]

'footer_right' => array(

[other widgets]

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

    [other widgets]

)

[other zones] )

Returns
A collection of widgets.

Definition at line 119 of file class-gv-collection-widget.php.

◆ get()

get (   $widget_uid)

Get a from this list by UID.

Parameters
int$widget_uidThe UID of the widget in the collection to get.
Since
2.0
Returns
|null The with the $widget_uid as the UID, or null if not found.

Definition at line 40 of file class-gv-collection-widget.php.


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