Skip to content

ExampleArrayable ​

Type
Class
Namespace
craft\test\mockclasses\arrayable
Inherits
craft\test\mockclasses\arrayable\ExampleArrayable
Implements
yii\base\Arrayable
Uses traits
yii\base\ArrayableTrait
Since
3.2.0

Class ExampleArrayble

View source

Public Properties ​

PropertyDescription
exampleArrayableParamstring
extraFieldstring

exampleArrayableParam ​

Type
string
Default value
null

View source

extraField ​

Type
string
Default value
null

View source

Public Methods ​

MethodDescription
extraFields()
fields()Returns the list of fields that should be returned by default by toArray() when no specific fields are specified.
toArray()Converts the model into an array.

extraFields() ​

View source

Returns ​

array

Protected Methods ​

MethodDescription
extractFieldsFor()Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id".
extractRootFields()Extracts the root field names from nested fields.
resolveFields()Determines which fields can be returned by toArray().