TImageCropper
extends TField
in package
implements
AdiantiWidgetInterface
Image uploader with cropper
Tags
Table of Contents
Interfaces
- AdiantiWidgetInterface
- Widget Interface
Constants
- CROPPER_RATIO_16_9 = 16 / 9
- CROPPER_RATIO_1_1 = 1 / 1
- CROPPER_RATIO_2_3 = 2 / 3
- CROPPER_RATIO_4_3 = 4 / 3
Properties
- $editable : mixed
- $formName : mixed
- $height : mixed
- $id : mixed
- $label : mixed
- $name : mixed
- $properties : mixed
- $size : mixed
- $tag : mixed
- $value : mixed
- $valueCallback : mixed
- $width : mixed
- $aspectRatio : mixed
- $base64 : mixed
- $buttonDrag : mixed
- $buttonReset : mixed
- $buttonRotate : mixed
- $buttonScale : mixed
- $buttonText : mixed
- $buttonZoom : mixed
- $cropHeight : mixed
- $cropWidth : mixed
- $extensions : mixed
- $fileHandling : mixed
- $imagePlaceholder : mixed
- $seed : mixed
- $title : mixed
- $uploaderClass : mixed
- $validations : mixed
- $webcam : mixed
Methods
- __call() : mixed
- Redirects function call
- __clone() : mixed
- Clone the object
- __construct() : mixed
- Class Constructor
- __get() : mixed
- Returns a property value
- __isset() : mixed
- Returns if the property is set
- __set() : mixed
- Intercepts whenever someones assign a new property's value
- __toString() : mixed
- Converts the object into a string
- addValidation() : mixed
- Add a field validator
- clearField() : mixed
- Clear the field
- disableButtonReset() : mixed
- Disable button reset
- disableButtonsDrag() : mixed
- Disable buttons drag move | resize
- disableButtonsRotate() : mixed
- Disable buttons rotates
- disableButtonsScale() : mixed
- Disable buttons scale
- disableButtonsZoom() : mixed
- Disable buttons zoom
- disableField() : mixed
- Disable the field
- enableBase64() : mixed
- Define usage base64
- enableField() : mixed
- Enable the field
- enableFileHandling() : mixed
- Define to file handling
- enableWebCam() : mixed
- getAllowedExtensions() : mixed
- Get the allowed extensions
- getContents() : mixed
- Returns the element content as a string
- getEditable() : A
- Returns if the field is editable
- getFormName() : mixed
- Return the name of the form to wich the field is attached
- getId() : mixed
- Returns the field's id
- getLabel() : mixed
- Returns the field's label
- getName() : mixed
- Returns the field's name
- getOptions() : mixed
- Return component specific options
- getPostData() : mixed
- Return the post data
- getPropertiesAsString() : mixed
- Get properties as string
- getProperty() : mixed
- Return a field property
- getSize() : mixed
- Returns the field sizes
- getValidations() : mixed
- Returns field validations
- getValue() : mixed
- Returns the field's value
- isRequired() : mixed
- Returns if the field is required
- setAllowedExtensions() : mixed
- Define the allowed extensions
- setAspectRatio() : void
- Define initial aspect ratio
- setButtonLabel() : mixed
- Set text button crop
- setCropSize() : void
- Set image size after crop
- setEditable() : mixed
- Define if the field is editable
- setFormName() : mixed
- Define the name of the form to wich the field is attached
- setId() : mixed
- Define the field's id
- setImagePlaceholder() : mixed
- Set image placeholder
- setLabel() : mixed
- Define the field's label
- setName() : mixed
- Define the field's name
- setProperty() : mixed
- Define a field property
- setService() : mixed
- Define the service class for response
- setSize() : mixed
- Define the Field's width
- setTagName() : mixed
- Change input tag name
- setTip() : mixed
- Define the field's tooltip
- setValue() : mixed
- Define image initial
- setValueCallback() : mixed
- Set callback for setValue method
- setWindowTitle() : mixed
- Set window title
- show() : mixed
- Show
- validate() : mixed
- Validate a field
Constants
CROPPER_RATIO_16_9
public
mixed
CROPPER_RATIO_16_9
= 16 / 9
CROPPER_RATIO_1_1
public
mixed
CROPPER_RATIO_1_1
= 1 / 1
CROPPER_RATIO_2_3
public
mixed
CROPPER_RATIO_2_3
= 2 / 3
CROPPER_RATIO_4_3
public
mixed
CROPPER_RATIO_4_3
= 4 / 3
Properties
$editable
protected
mixed
$editable
$formName
protected
mixed
$formName
$height
protected
mixed
$height
$id
protected
mixed
$id
$label
protected
mixed
$label
$name
protected
mixed
$name
$properties
protected
mixed
$properties
$size
protected
mixed
$size
$tag
protected
mixed
$tag
$value
protected
mixed
$value
$valueCallback
protected
mixed
$valueCallback
$width
protected
mixed
$width
$aspectRatio
private
mixed
$aspectRatio
$base64
private
mixed
$base64
$buttonDrag
private
mixed
$buttonDrag
$buttonReset
private
mixed
$buttonReset
$buttonRotate
private
mixed
$buttonRotate
$buttonScale
private
mixed
$buttonScale
$buttonText
private
mixed
$buttonText
$buttonZoom
private
mixed
$buttonZoom
$cropHeight
private
mixed
$cropHeight
$cropWidth
private
mixed
$cropWidth
$extensions
private
mixed
$extensions
$fileHandling
private
mixed
$fileHandling
$imagePlaceholder
private
mixed
$imagePlaceholder
$seed
private
mixed
$seed
$title
private
mixed
$title
$uploaderClass
private
mixed
$uploaderClass
$validations
private
mixed
$validations
$webcam
private
mixed
$webcam
Methods
__call()
Redirects function call
public
__call( $method, $param) : mixed
Parameters
__clone()
Clone the object
public
__clone() : mixed
__construct()
Class Constructor
public
__construct(mixed $name) : mixed
Parameters
- $name : mixed
-
name of the field
__get()
Returns a property value
public
__get( $name) : mixed
Parameters
__isset()
Returns if the property is set
public
__isset( $name) : mixed
Parameters
__set()
Intercepts whenever someones assign a new property's value
public
__set( $name, $value) : mixed
Parameters
__toString()
Converts the object into a string
public
__toString() : mixed
addValidation()
Add a field validator
public
addValidation( $label, $validator[, $parameters = NULL ]) : mixed
Parameters
clearField()
Clear the field
public
static clearField( $form_name, $field) : mixed
Parameters
disableButtonReset()
Disable button reset
public
disableButtonReset() : mixed
disableButtonsDrag()
Disable buttons drag move | resize
public
disableButtonsDrag() : mixed
disableButtonsRotate()
Disable buttons rotates
public
disableButtonsRotate() : mixed
disableButtonsScale()
Disable buttons scale
public
disableButtonsScale() : mixed
disableButtonsZoom()
Disable buttons zoom
public
disableButtonsZoom() : mixed
disableField()
Disable the field
public
static disableField( $form_name, $field) : mixed
Parameters
enableBase64()
Define usage base64
public
enableBase64() : mixed
enableField()
Enable the field
public
static enableField( $form_name, $field) : mixed
Parameters
enableFileHandling()
Define to file handling
public
enableFileHandling() : mixed
enableWebCam()
public
enableWebCam() : mixed
getAllowedExtensions()
Get the allowed extensions
public
getAllowedExtensions() : mixed
getContents()
Returns the element content as a string
public
getContents() : mixed
getEditable()
Returns if the field is editable
public
getEditable() : A
Return values
A —boolean
getFormName()
Return the name of the form to wich the field is attached
public
getFormName() : mixed
getId()
Returns the field's id
public
getId() : mixed
getLabel()
Returns the field's label
public
getLabel() : mixed
getName()
Returns the field's name
public
getName() : mixed
getOptions()
Return component specific options
public
getOptions() : mixed
getPostData()
Return the post data
public
getPostData() : mixed
getPropertiesAsString()
Get properties as string
public
getPropertiesAsString([mixed $filter = null ]) : mixed
Parameters
- $filter : mixed = null
getProperty()
Return a field property
public
getProperty( $name) : mixed
Parameters
getSize()
Returns the field sizes
public
getSize() : mixed
getValidations()
Returns field validations
public
getValidations() : mixed
getValue()
Returns the field's value
public
getValue() : mixed
isRequired()
Returns if the field is required
public
isRequired() : mixed
setAllowedExtensions()
Define the allowed extensions
public
setAllowedExtensions(mixed $extensions) : mixed
Parameters
- $extensions : mixed
setAspectRatio()
Define initial aspect ratio
public
setAspectRatio(float $aspectRatio) : void
Parameters
- $aspectRatio : float
-
Aspect ratio crop image
setButtonLabel()
Set text button crop
public
setButtonLabel(string $text) : mixed
Parameters
- $text : string
-
Text button confirm
setCropSize()
Set image size after crop
public
setCropSize(px $width, px $height) : void
Parameters
- $width : px
- $height : px
setEditable()
Define if the field is editable
public
setEditable( $editable) : mixed
Parameters
setFormName()
Define the name of the form to wich the field is attached
public
setFormName( $name) : mixed
Parameters
Tags
setId()
Define the field's id
public
setId( $id) : mixed
Parameters
setImagePlaceholder()
Set image placeholder
public
setImagePlaceholder(TImage $image) : mixed
Parameters
- $image : TImage
-
image placeholder
setLabel()
Define the field's label
public
setLabel( $label) : mixed
Parameters
setName()
Define the field's name
public
setName( $name) : mixed
Parameters
setProperty()
Define a field property
public
setProperty( $name, $value[, mixed $replace = TRUE ]) : mixed
Parameters
setService()
Define the service class for response
public
setService(mixed $service) : mixed
Parameters
- $service : mixed
setSize()
Define the Field's width
public
setSize(float $width[, float $height = NULL ]) : mixed
Parameters
- $width : float
-
Field's width in pixels
- $height : float = NULL
-
Field's heigth in pixels
setTagName()
Change input tag name
public
setTagName(mixed $name) : mixed
Parameters
- $name : mixed
setTip()
Define the field's tooltip
public
setTip(mixed $tip) : mixed
Parameters
- $tip : mixed
setValue()
Define image initial
public
setValue(mixed $value) : mixed
Parameters
- $value : mixed
-
A string containing the field's value
setValueCallback()
Set callback for setValue method
public
setValueCallback(mixed $callback) : mixed
Parameters
- $callback : mixed
setWindowTitle()
Set window title
public
setWindowTitle(string $title) : mixed
Parameters
- $title : string
-
Window title
show()
Show
public
show() : mixed
validate()
Validate a field
public
validate() : mixed