Reference

Guide

$user->createFile()

Creates a new file

$user->createFile(array $props): File

Parameters

Name Type Default Description
$props array

Return type

File

The $props parameter

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

Source code

kirby/src/Cms/HasFiles.php#L54