$fields->prepend()
Prepends an element to the data array
$fields->prepend(string|Kirby\Form\Field|Kirby\Form\FieldClass ...$args): Kirby\Form\Fields
Parameters
Name | Type | Default |
---|---|---|
...$args | string orKirby\Form\Field orKirby\Form\FieldClass |
no default value |
Return type
This method modifies the existing $fields
object it is applied to and returns it again.
Parent class
Kirby\Form\Fields
inherited from Kirby\Toolkit\Collection
Examples
$collection->prepend('key', $value);
$collection->prepend($value);