PHP Class Horde_Form_Type_image, horde

Inheritance: extends Horde_Form_Type
Mostrar archivo Open project: horde/horde

Public Properties

Property Type Description
$_img array Hash containing the previously uploaded image info.
$_max_filesize integer Limit the file size?
$_random string A random id that identifies the image information in the session data.
$_show_keeporig boolean Show the option to upload also original non-modified image?
$_show_upload boolean Show the upload button?
$_uploaded boolean Has a file been uploaded on this form submit?

Public Methods

Method Description
_getUpload ( Horde_Variables &$vars, Horde_Form_Variable &$var ) Gets the upload and sets up the upload data array. Either fetches an upload done with this submit or retrieves stored upload info.
about ( ) Return info about field type.
getImage ( Horde_Variables $vars, Horde_Form_Variable $var ) : array Returns the current image information.
getInfo ( &$vars, &$var, &$info )
getRandomId ( )
getUploadedFileType ( $field )
init ( $show_upload = true, $show_keeporig = false, $max_filesize = null )
isValid ( Horde_Form_Variable &$var, Horde_Variables &$vars, array $value, something &$message )
loadImageData ( array &$image ) Loads any existing image data into the image field. Requires that the array $image passed to it contains the structure: $image['load']['file'] - the filename of the image; $image['load']['data'] - the raw image data.
onSubmit ( &$var, &$vars )

Method Details

_getUpload() public method

Gets the upload and sets up the upload data array. Either fetches an upload done with this submit or retrieves stored upload info.
public _getUpload ( Horde_Variables &$vars, Horde_Form_Variable &$var )
$vars Horde_Variables The form state to check this field for
$var Horde_Form_Variable The Form field object to check

about() public method

Return info about field type.
public about ( )

getImage() public method

Returns the current image information.
public getImage ( Horde_Variables $vars, Horde_Form_Variable $var ) : array
$vars Horde_Variables The form state to check this field for
$var Horde_Form_Variable The Form field object to check
return array The current image hash.

getInfo() public method

public getInfo ( &$vars, &$var, &$info )

getRandomId() public method

public getRandomId ( )

getUploadedFileType() public method

public getUploadedFileType ( $field )

init() public method

public init ( $show_upload = true, $show_keeporig = false, $max_filesize = null )

isValid() public method

public isValid ( Horde_Form_Variable &$var, Horde_Variables &$vars, array $value, something &$message )
$var Horde_Form_Variable The Form field object to check
$vars Horde_Variables The form state to check this field for
$value array The field value array - should contain a key ['hash'] which holds the key for the image on temp storage
$message something Not clear what this field does

loadImageData() public method

Loads any existing image data into the image field. Requires that the array $image passed to it contains the structure: $image['load']['file'] - the filename of the image; $image['load']['data'] - the raw image data.
public loadImageData ( array &$image )
$image array The image array.

onSubmit() public method

public onSubmit ( &$var, &$vars )

Property Details

$_img public_oe property

Hash containing the previously uploaded image info.
public array $_img
return array

$_max_filesize public_oe property

Limit the file size?
public int $_max_filesize
return integer

$_random public_oe property

A random id that identifies the image information in the session data.
public string $_random
return string

$_show_keeporig public_oe property

Show the option to upload also original non-modified image?
public bool $_show_keeporig
return boolean

$_show_upload public_oe property

Show the upload button?
public bool $_show_upload
return boolean

$_uploaded public_oe property

Has a file been uploaded on this form submit?
public bool $_uploaded
return boolean