Skip to content

Kirby 6.0.0

$languages->update()

Updates an object in the collection

$languages->update(string|Language $key, Language|null $object = null): Languages

Parameters

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

Return type

Kirby\Cms\Languages

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

Parent class

Kirby\Cms\Languages inherited from Kirby\Cms\Collection