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
Public Properties ​
Property | Description |
---|---|
exampleArrayableParam | string |
extraField | string |
exampleArrayableParam
​
- Type
- string
- Default value
null
extraField
​
- Type
- string
- Default value
null
Public Methods ​
Method | Description |
---|---|
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()
​
Returns ​
Protected Methods ​
Method | Description |
---|---|
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(). |