Skip to content

Kirby 3.5.7.1

new File()

Creates a new File object

new File(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\File object:

Name Type Description
blueprint array Sets the Blueprint object
content array Sets the Content object
filename * string Sets the filename
parent Kirby\Cms\Model Sets the parent model object;
this property is required for File::create() and
will be generally required starting with Kirby 3.7.0
root string Always set the root to null, to invoke
auto root detection
template string
translations array Create the translations collection from an array
url string Sets the url

Parent class

Kirby\Cms\File