Skip to content

Kirby 5.0.2

$site->save()

Low-level method to save the model with the given data. Consider using ::update() instead.

$site->save(array|null $data = null, string|null $languageCode = null, bool $overwrite = false): Kirby\Cms\Site

Parameters

Name Type Default
$data arrayornull null
$languageCode stringornull null
$overwrite 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

Examples

$newSite = $site->save(
    [
        'text' => 'Here is some text',
        'info' => 'Some info text',
    ]
);