Devise
Class

Devise\Pages\Collections\CollectionFields

class CollectionFields

This classes purpose is to act as a container for fields on the collection level.

A collection can have multiple fields, e.g.

myCollection->field1->someProperty
myCollection->field2->someProperty

We hydrate all the fields on construction of this object. If a field is not found on this collection fields object then a generic FieldValue({}) is returned so that we don't run into NullPointerExceptions

Methods

__construct(array $fields)

Create a new collection fields object from an array of fields

FieldValue __get(string $name)

This magic method is used whenever we attempt to access a field key that doesn't exist on this CollectionFields container so that we don't return null (in case that we are chaining things)

Details

at line 26
public __construct(array $fields)

Create a new collection fields object from an array of fields

Parameters

array $fields

at line 58
public FieldValue __get(string $name)

This magic method is used whenever we attempt to access a field key that doesn't exist on this CollectionFields container so that we don't return null (in case that we are chaining things)

Parameters

string $name

Return Value

FieldValue