$structure->update()
Updates an object in the collection
$structure->update(string|StructureObject $key, StructureObject|null $object = null): Structure
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $keyrequired | stringorKirby\Cms\StructureObject |
no default value | Key or object to update |
| $object | Kirby\Cms\StructureObjectornull |
null
|
New object for the key |
Return type
This method modifies the existing $structure object it is applied to and returns it again.
Parent class
Kirby\Cms\Structure
inherited from Kirby\Cms\Collection