FileUploadConfiguration

Internal

Only to be used within Extbase, not part of TYPO3 Core API.

Table of Contents

Properties

$addRandomSuffix  : bool
$createUploadFolderIfNotExist  : bool
$duplicationBehavior  : DuplicationBehavior
$maxFiles  : int
$minFiles  : int
$propertyName  : string
$uploadFolder  : string
$validators  : array<string|int, ValidatorInterface>

Methods

__construct()  : mixed
addFileNameValidator()  : self
addValidator()  : self
ensureValidConfiguration()  : void
Checks if the current configuration is considered valid for the given target type and throws an exception, if the configuration is invalid.
getDuplicationBehavior()  : DuplicationBehavior
getMaxFiles()  : int
getMinFiles()  : int
getPropertyName()  : string
getUploadFolder()  : string
getValidators()  : array<string|int, mixed>
initializeWithConfiguration()  : self
Initializes the object with the given configuration array. Typically used with configuration from FileUpload annotation/attribute.
isAddRandomSuffix()  : bool
isCreateUploadFolderIfNotExist()  : bool
resetValidators()  : self
setAddRandomSuffix()  : self
setCreateUploadFolderIfNotExist()  : self
setDuplicationBehavior()  : void
setMaxFiles()  : self
setMinFiles()  : self
setRequired()  : self
setUploadFolder()  : self

Properties

$addRandomSuffix

protected bool $addRandomSuffix = true

$createUploadFolderIfNotExist

protected bool $createUploadFolderIfNotExist = true

$maxFiles

protected int $maxFiles = PHP_INT_MAX

$propertyName read-only

protected string $propertyName

$uploadFolder

protected string $uploadFolder = ''

Methods

__construct()

public __construct(string $propertyName) : mixed
Parameters
$propertyName : string

addFileNameValidator()

public addFileNameValidator() : self
Return values
self

ensureValidConfiguration()

Checks if the current configuration is considered valid for the given target type and throws an exception, if the configuration is invalid.

public ensureValidConfiguration(string $targetType) : void
Parameters
$targetType : string

getMaxFiles()

public getMaxFiles() : int
Return values
int

getMinFiles()

public getMinFiles() : int
Return values
int

getPropertyName()

public getPropertyName() : string
Return values
string

getUploadFolder()

public getUploadFolder() : string
Return values
string

getValidators()

public getValidators() : array<string|int, mixed>
Return values
array<string|int, mixed>

initializeWithConfiguration()

Initializes the object with the given configuration array. Typically used with configuration from FileUpload annotation/attribute.

public initializeWithConfiguration(array<string|int, mixed> $configuration) : self
Parameters
$configuration : array<string|int, mixed>
Return values
self

isAddRandomSuffix()

public isAddRandomSuffix() : bool
Return values
bool

isCreateUploadFolderIfNotExist()

public isCreateUploadFolderIfNotExist() : bool
Return values
bool

resetValidators()

public resetValidators() : self
Return values
self

setAddRandomSuffix()

public setAddRandomSuffix(bool $addRandomSuffix) : self
Parameters
$addRandomSuffix : bool
Return values
self

setCreateUploadFolderIfNotExist()

public setCreateUploadFolderIfNotExist(bool $createUploadFolderIfNotExist) : self
Parameters
$createUploadFolderIfNotExist : bool
Return values
self

setMaxFiles()

public setMaxFiles(int $maxFiles) : self
Parameters
$maxFiles : int
Return values
self

setMinFiles()

public setMinFiles(int $minFiles) : self
Parameters
$minFiles : int
Return values
self

setRequired()

public setRequired() : self
Return values
self

setUploadFolder()

public setUploadFolder(string $uploadFolder) : self
Parameters
$uploadFolder : string
Return values
self

        
On this page

Search results