Skip to content

Kirby 6.0.0

$optionField->prev()

Returns the previous item in the collection if available

$optionField->prev(TCollection|null $collection = null): OptionField|null

Parameters

Name Type Default
$collection TCollectionornull null

Return types

Kirby\Form\Field\OptionFieldornull

This method does not modify the existing $optionfield object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Form\Field\OptionField inherited from Kirby\Form\Field