Skip to content

Kirby 5.0.2

$page->changeStorage()

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

$page->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.

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

Parameters

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

Return type

Kirby\Cms\Page

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

Parent class

Kirby\Cms\Page inherited from Kirby\Cms\ModelWithContent