Horde_Form_Type_image
extends Horde_Form_Type
in package
Horde_Form_Type Class
Table of Contents
- $_img : array<string|int, mixed>
- Hash containing the previously uploaded image info.
- $_max_filesize : int
- Limit the file size?
- $_random : string
- A random id that identifies the image information in the session data.
- $_show_keeporig : bool
- Show the option to upload also original non-modified image?
- $_show_upload : bool
- Show the upload button?
- $_uploaded : bool
- Has a file been uploaded on this form submit?
- __get() : mixed
- __set() : mixed
- _getUpload() : mixed
- Gets the upload and sets up the upload data array. Either fetches an upload done with this submit or retrieves stored upload info.
- about() : mixed
- Return info about field type.
- getImage() : array<string|int, mixed>
- Returns the current image information.
- getInfo() : mixed
- getProperty() : mixed
- getRandomId() : mixed
- getTypeName() : mixed
- getUploadedFileType() : mixed
- getValues() : mixed
- init() : mixed
- Init a Country field
- isValid() : mixed
- loadImageData() : mixed
- 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() : mixed
- function onSubmit(&$var, &$vars)
- setProperty() : mixed
Properties
$_img
Hash containing the previously uploaded image info.
public
array<string|int, mixed>
$_img
$_max_filesize
Limit the file size?
public
int
$_max_filesize
= \null
$_random
A random id that identifies the image information in the session data.
public
string
$_random
$_show_keeporig
Show the option to upload also original non-modified image?
public
bool
$_show_keeporig
= \false
$_show_upload
Show the upload button?
public
bool
$_show_upload
= \true
$_uploaded
Has a file been uploaded on this form submit?
public
bool
$_uploaded
= \null
Methods
__get()
public
__get(mixed $property) : mixed
Parameters
- $property : mixed
Return values
mixed —__set()
public
__set(mixed $property, mixed $value) : mixed
Parameters
- $property : mixed
- $value : mixed
Return values
mixed —_getUpload()
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) : mixed
Parameters
- $vars : Horde_Variables
-
The form state to check this field for
- $var : Horde_Form_Variable
-
The Form field object to check
Return values
mixed —about()
Return info about field type.
public
about() : mixed
Return values
mixed —getImage()
Returns the current image information.
public
getImage(Horde_Variables $vars, Horde_Form_Variable $var) : array<string|int, mixed>
Parameters
- $vars : Horde_Variables
-
The form state to check this field for
- $var : Horde_Form_Variable
-
The Form field object to check
Return values
array<string|int, mixed> —The current image hash.
getInfo()
public
getInfo(mixed &$vars, mixed &$var, mixed &$info) : mixed
Parameters
- $vars : mixed
- $var : mixed
- $info : mixed
Return values
mixed —getProperty()
public
getProperty(mixed $property) : mixed
Parameters
- $property : mixed
Return values
mixed —getRandomId()
public
getRandomId() : mixed
Return values
mixed —getTypeName()
public
getTypeName() : mixed
Return values
mixed —getUploadedFileType()
public
getUploadedFileType(mixed $field) : mixed
Parameters
- $field : mixed
Return values
mixed —getValues()
public
getValues(mixed ...$params) : mixed
Parameters
- $params : mixed
Return values
mixed —init()
Init a Country field
public
init(mixed ...$params) : mixed
function init($show_upload = true, $show_keeporig = false, $max_filesize = null)
Parameters
- $params : mixed
Return values
mixed —isValid()
public
isValid(Horde_Form_Variable &$var, Horde_Variables &$vars, array<string|int, mixed> $value, something &$message) : mixed
Parameters
- $var : Horde_Form_Variable
-
The Form field object to check
- $vars : Horde_Variables
-
The form state to check this field for
- $value : array<string|int, mixed>
-
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
Return values
mixed —loadImageData()
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<string|int, mixed> &$image) : mixed
Parameters
- $image : array<string|int, mixed>
-
The image array.
Return values
mixed —onSubmit()
function onSubmit(&$var, &$vars)
public
onSubmit(mixed ...$params) : mixed
Parameters
- $params : mixed
Return values
mixed —setProperty()
public
setProperty(mixed $property, mixed $value) : mixed
Parameters
- $property : mixed
- $value : mixed