Skip to content

Kirby 6.0.0

$translations->update()

Updates an object in the collection

$translations->update(string|Translation $key, Translation|null $object = null): Translations

Parameters

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

Return type

Kirby\Content\Translations

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

Parent class

Kirby\Content\Translations inherited from Kirby\Cms\Collection