Skip to content

Kirby 6.0.0

$files->update()

Updates an object in the collection

$files->update(string|File $key, File|null $object = null): Files

Parameters

Name Type Default Description
$keyrequired stringorKirby\Cms\File no default value Key or object to update
$object Kirby\Cms\Fileornull null New object for the key

Return type

Kirby\Cms\Files

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

Parent class

Kirby\Cms\Files inherited from Kirby\Cms\Collection