\Horde_Form_Type_image

Horde_Form_Type Class

Summary

Methods
Properties
Constants
getProperty()
__get()
setProperty()
__set()
init()
onSubmit()
isValid()
getTypeName()
getValues()
getInfo()
_getUpload()
getUploadedFileType()
getImage()
loadImageData()
getRandomId()
about()
$_uploaded
$_show_upload
$_show_keeporig
$_max_filesize
$_img
$_random
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_uploaded

$_uploaded : boolean

Has a file been uploaded on this form submit?

Type

boolean

$_show_upload

$_show_upload : boolean

Show the upload button?

Type

boolean

$_show_keeporig

$_show_keeporig : boolean

Show the option to upload also original non-modified image?

Type

boolean

$_max_filesize

$_max_filesize : integer

Limit the file size?

Type

integer

$_img

$_img : array

Hash containing the previously uploaded image info.

Type

array

$_random

$_random : string

A random id that identifies the image information in the session data.

Type

string

Methods

getProperty()

getProperty(  $property) 

Parameters

$property

__get()

__get(  $property) 

Parameters

$property

setProperty()

setProperty(  $property,   $value) 

Parameters

$property
$value

__set()

__set(  $property,   $value) 

Parameters

$property
$value

init()

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

Initialize (kind of constructor) - Parameter list may vary on overloading

Parameters

$show_upload
$show_keeporig
$max_filesize

onSubmit()

onSubmit(  $var,   $vars) 

Parameters

$var
$vars

isValid()

isValid(\Horde_Form_Variable  $var, \Horde_Variables  $vars, array  $value, \something  $message) 

Parameters

\Horde_Form_Variable $var

The Form field object to check

\Horde_Variables $vars

The form state to check this field for

array $value

The field value array - should contain a key ['hash'] which holds the key for the image on temp storage

\something $message

Not clear what this field does

getTypeName()

getTypeName() 

getValues()

getValues() 

getInfo()

getInfo(  $vars,   $var,   $info) 

Parameters

$vars
$var
$info

_getUpload()

_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.

Parameters

\Horde_Variables $vars

The form state to check this field for

\Horde_Form_Variable $var

The Form field object to check

getUploadedFileType()

getUploadedFileType(  $field) 

Parameters

$field

getImage()

getImage(\Horde_Variables  $vars, \Horde_Form_Variable  $var) : array

Returns the current image information.

Parameters

\Horde_Variables $vars

The form state to check this field for

\Horde_Form_Variable $var

The Form field object to check

Returns

array —

The current image hash.

loadImageData()

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.

Parameters

array $image

The image array.

getRandomId()

getRandomId() 

about()

about() 

Return info about field type.