GravityKit\GravityView\Form\FormCollection
A collection of \GV\Form objects.
Since:
2.03.0.0(Migrated to GravityKit\GravityView\Form namespace.)
Source: src/Form/FormCollection.php:21
Details
- Kind:
class - Namespace:
GravityKit\GravityView\Form - Extends:
GV\Collection
Methods
| Method | Description |
|---|---|
add() | Add a \GV\Form to this collection. |
get() | Get a \GV\Form from this list. |
Method Reference
add()
public function add( $form )
Add a \GV\Form to this collection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | \GV\Form | The form to add to the internal array. |
Returns
void
Since: 2.0
Source: src/Form/FormCollection.php:31
get()
public function get( $form_id, $backend='gravityforms' )
Get a \GV\Form from this list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | The ID of the form to get. | |
$backend | string | 'gravityforms' | The form backend identifier, allows for multiple form backends in the future. Unused until then. |
Returns
\GV\Form|null— The \GV\Form with the $form_id as the ID, or null if not found.
Since: 2.0
Source: src/Form/FormCollection.php:50