FileUploadConfiguration
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
$duplicationBehavior
protected
DuplicationBehavior
$duplicationBehavior
= \TYPO3\CMS\Core\Resource\Enum\DuplicationBehavior::RENAME
$maxFiles
protected
int
$maxFiles
= PHP_INT_MAX
$minFiles
protected
int
$minFiles
= 0
$propertyName read-only
protected
string
$propertyName
$uploadFolder
protected
string
$uploadFolder
= ''
$validators
protected
array<string|int, ValidatorInterface>
$validators
= []
Methods
__construct()
public
__construct(string $propertyName) : mixed
Parameters
- $propertyName : string
addFileNameValidator()
public
addFileNameValidator() : self
Return values
selfaddValidator()
public
addValidator(ValidatorInterface $validator) : self
Parameters
- $validator : ValidatorInterface
Return values
selfensureValidConfiguration()
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
getDuplicationBehavior()
public
getDuplicationBehavior() : DuplicationBehavior
Return values
DuplicationBehaviorgetMaxFiles()
public
getMaxFiles() : int
Return values
intgetMinFiles()
public
getMinFiles() : int
Return values
intgetPropertyName()
public
getPropertyName() : string
Return values
stringgetUploadFolder()
public
getUploadFolder() : string
Return values
stringgetValidators()
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
selfisAddRandomSuffix()
public
isAddRandomSuffix() : bool
Return values
boolisCreateUploadFolderIfNotExist()
public
isCreateUploadFolderIfNotExist() : bool
Return values
boolresetValidators()
public
resetValidators() : self
Return values
selfsetAddRandomSuffix()
public
setAddRandomSuffix(bool $addRandomSuffix) : self
Parameters
- $addRandomSuffix : bool
Return values
selfsetCreateUploadFolderIfNotExist()
public
setCreateUploadFolderIfNotExist(bool $createUploadFolderIfNotExist) : self
Parameters
- $createUploadFolderIfNotExist : bool
Return values
selfsetDuplicationBehavior()
public
setDuplicationBehavior(DuplicationBehavior $duplicationBehavior) : void
Parameters
- $duplicationBehavior : DuplicationBehavior
setMaxFiles()
public
setMaxFiles(int $maxFiles) : self
Parameters
- $maxFiles : int
Return values
selfsetMinFiles()
public
setMinFiles(int $minFiles) : self
Parameters
- $minFiles : int
Return values
selfsetRequired()
public
setRequired() : self
Return values
selfsetUploadFolder()
public
setUploadFolder(string $uploadFolder) : self
Parameters
- $uploadFolder : string