Skip to content

Kirby 6.0.0

$versions->update()

Updates an object in the collection

$versions->update(string|Version $key, Version|null $object = null): Versions

Parameters

Name Type Default Description
$keyrequired stringorKirby\Content\Version no default value Key or object to update
$object Kirby\Content\Versionornull null New object for the key

Return type

Kirby\Content\Versions

This method modifies the existing $versions object it is applied to and returns it again.

Parent class

Kirby\Content\Versions inherited from Kirby\Cms\Collection