PHP Class Contao\FileUpload

Inheritance: extends Backend
Exibir arquivo Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$blnHasError boolean Error indicator
$blnHasResized boolean Resized indicator
$strName string Field name

Public Methods

Method Description
__construct ( ) Make the constructor public
generateMarkup ( ) : string Generate the markup for the default uploader
hasError ( ) : boolean Return true if there was an error
hasResized ( ) : boolean Return true if there was a resized image
setName ( string $strName ) Override the field name
uploadTo ( string $strTarget ) : array Check the uploaded files and move them to the target directory

Protected Methods

Method Description
getFilesFromGlobal ( ) : array Get the files from the global $_FILES array
getMaximumUploadSize ( ) : string Return the maximum upload file size in bytes
resizeUploadedImage ( string $strImage ) : boolean Resize an uploaded image if neccessary

Method Details

__construct() public method

Make the constructor public
public __construct ( )

generateMarkup() public method

Generate the markup for the default uploader
public generateMarkup ( ) : string
return string

getFilesFromGlobal() protected method

Get the files from the global $_FILES array
protected getFilesFromGlobal ( ) : array
return array

getMaximumUploadSize() protected method

Return the maximum upload file size in bytes
protected getMaximumUploadSize ( ) : string
return string

hasError() public method

Return true if there was an error
public hasError ( ) : boolean
return boolean

hasResized() public method

Return true if there was a resized image
public hasResized ( ) : boolean
return boolean

resizeUploadedImage() protected method

Resize an uploaded image if neccessary
protected resizeUploadedImage ( string $strImage ) : boolean
$strImage string
return boolean

setName() public method

Override the field name
public setName ( string $strName )
$strName string

uploadTo() public method

Check the uploaded files and move them to the target directory
public uploadTo ( string $strTarget ) : array
$strTarget string
return array

Property Details

$blnHasError protected_oe property

Error indicator
protected bool $blnHasError
return boolean

$blnHasResized protected_oe property

Resized indicator
protected bool $blnHasResized
return boolean

$strName protected_oe property

Field name
protected string $strName
return string