ExampleArrayable
- Type
- Class
- Namespace
- craft\test\mockclasses\arrayable
- Inherits
- craft\test\mockclasses\arrayable\ExampleArrayable
- Implements
- yii\base\Arrayable (opens new window)
- Uses traits
- yii\base\ArrayableTrait (opens new window)
- Since
- 3.2.0
Class ExampleArrayble
View source (opens new window)
# Public Properties
Property | Description |
---|---|
exampleArrayableParam | string (opens new window) |
extraField | string (opens new window) |
# exampleArrayableParam
- Type
- string (opens new window)
- Default value
null
View source (opens new window)
# extraField
- Type
- string (opens new window)
- Default value
null
View source (opens new window)
# Public Methods
Method | Description |
---|---|
extraFields() | |
fields() (opens new window) | Returns the list of fields that should be returned by default by toArray() (opens new window) when no specific fields are specified. |
toArray() (opens new window) | Converts the model into an array. |
# extraFields()
View source (opens new window)
Returns
# Protected Methods
Method | Description |
---|---|
extractFieldsFor() (opens new window) | 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() (opens new window) | Extracts the root field names from nested fields. |
resolveFields() (opens new window) | Determines which fields can be returned by toArray() (opens new window). |