Reference

Guide

$page->createFile()

Creates a new file

$page->createFile(array $props): Kirby\Cms\File

Parameters

Name Type Default Description
$props array

Return type

Kirby\Cms\File

The $props parameter

Property Type Description
blueprint array Blueprint definition
content array Field values
filename string Field values
parent* Kirby\Cms\Model $site, $page or $user
root string
source* string
template string
translations array Language codes with subarrays of field values
url string

Source code

kirby/src/Cms/HasFiles.php#L61