$fieldMethods->replace()
It parses any queries found in the field value.
$fieldMethods->replace(array $data = [], string|null $fallback = ''): FieldMethods
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
Kirby\Content\FieldMethods
This method does not modify the existing $fieldmethods object but returns a new object with the changes applied. Learn more →
Parent class
Kirby\Content\FieldMethods