$field->replace()
It parses any queries found in the field value.
$field->replace(array $data = [], string|null $fallback = ''): Field
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $data | array |
[]
|
|
| $fallback | stringornull |
''
|
Fallback for tokens in the template that cannot be replaced (null to keep the original token) |
Return type
This method does not modify the existing $field object but returns a new object with the changes applied. Learn more →