Skip to content

new Site()

Creates a new Site object

new Site(array $props = [ ])

Parameters

Name Type Default
$props array [ ]

For the $props parameter, you pass an array with the following data, which will be used to set up the Kirby\Cms\Site object:

Name Type Description
blueprint array Sets the Blueprint object
children array Sets the Children collection
content array Sets the Content object
drafts array Sets the Drafts collection
errorPageId string Sets the id of the error page, which
is used in the errorPage method
to get the default error page if nothing
else is set.
files array Sets the Files collection
homePageId string Sets the id of the home page, which
is used in the homePage method
to get the default home page if nothing
else is set.
translations array Create the translations collection from an array
url string Sets the Url

Parent class

Kirby\Cms\Site