Skip to content

Kirby 5.0.2

$site->changeStorage()

Moves or copies the model to a new storage instance/type

$site->changeStorage() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

$site->changeStorage(Kirby\Content\Storage|string $toStorage, bool $copy = false): Kirby\Cms\Site

Parameters

Name Type Default
$toStoragerequired Kirby\Content\Storageorstring no default value
$copy bool false

Return type

Kirby\Cms\Site

This method does not modify the existing $site object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Cms\Site inherited from Kirby\Cms\ModelWithContent