Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($options) | |
getImageMin () | |
getImageMax () | |
getImageWidth () | |
getImageHeight () | |
setImageMin ($options) | |
setImageMax ($options) | |
setImageWidth ($options) | |
setImageHeight ($options) | |
isValid ($value, $file=null) | |
![]() | |
getMessages () | |
getMessageVariables () | |
getMessageTemplates () | |
setMessage ($messageString, $messageKey=null) | |
setMessages (array $messages) | |
__get ($property) | |
getErrors () | |
setObscureValue ($flag) | |
getObscureValue () | |
setTranslator ($translator=null) | |
getTranslator () | |
hasTranslator () | |
setDisableTranslator ($flag) | |
translatorIsDisabled () | |
![]() | |
isValid ($value) | |
Data Fields | |
const | WIDTH_TOO_BIG = 'fileImageSizeWidthTooBig' |
const | WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall' |
const | HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig' |
const | HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall' |
const | NOT_DETECTED = 'fileImageSizeNotDetected' |
const | NOT_READABLE = 'fileImageSizeNotReadable' |
Protected Member Functions | |
_throw ($file, $errorType) | |
![]() | |
_createMessage ($messageKey, $value) | |
_implodeRecursive (array $pieces) | |
_error ($messageKey, $value=null) | |
_setValue ($value) | |
Protected Attributes | |
$_messageTemplates | |
$_messageVariables | |
$_minwidth | |
$_maxwidth | |
$_minheight | |
$_maxheight | |
$_width | |
$_height | |
![]() | |
$_value | |
$_messageVariables = array() | |
$_messageTemplates = array() | |
$_messages = array() | |
$_obscureValue = false | |
$_errors = array() | |
$_translator | |
$_translatorDisabled = false | |
Additional Inherited Members | |
![]() | |
static | setDefaultTranslator ($translator=null) |
static | getDefaultTranslator () |
static | hasDefaultTranslator () |
static | getMessageLength () |
static | setMessageLength ($length=-1) |
![]() | |
static | $_defaultTranslator |
static | $_messageLength = -1 |
Definition at line 35 of file ImageSize.php.
__construct | ( | $options | ) |
Sets validator options
Accepts the following option keys:
Zend_Config | array | $options |
Zend_Validate_Exception |
Definition at line 125 of file ImageSize.php.
|
protected |
Throws an error of the given type
string | $file | |
string | $errorType |
Definition at line 351 of file ImageSize.php.
getImageHeight | ( | ) |
getImageMax | ( | ) |
getImageMin | ( | ) |
getImageWidth | ( | ) |
isValid | ( | $value, | |
$file = null |
|||
) |
Defined by Zend_Validate_Interface
Returns true if and only if the imagesize of $value is at least min and not bigger than max
string | $value | Real file to check for image size |
array | $file | File data from Zend_File_Transfer |
Definition at line 308 of file ImageSize.php.
setImageHeight | ( | $options | ) |
Sets the mimimum and maximum image height
array | $options | The image height dimensions |
Definition at line 290 of file ImageSize.php.
setImageMax | ( | $options | ) |
Sets the maximum image size
array | $options | The maximum image dimensions |
Zend_Validate_Exception | When maxwidth is smaller than minwidth |
Zend_Validate_Exception | When maxheight is smaller than minheight |
Definition at line 241 of file ImageSize.php.
setImageMin | ( | $options | ) |
Sets the minimum image size
array | $options | The minimum image dimensions |
Zend_Validate_Exception | When minwidth is greater than maxwidth |
Zend_Validate_Exception | When minheight is greater than maxheight |
Definition at line 204 of file ImageSize.php.
setImageWidth | ( | $options | ) |
Sets the mimimum and maximum image width
array | $options | The image width dimensions |
Definition at line 276 of file ImageSize.php.
|
protected |
Definition at line 111 of file ImageSize.php.
|
protected |
Definition at line 97 of file ImageSize.php.
|
protected |
Definition at line 83 of file ImageSize.php.
|
protected |
Definition at line 50 of file ImageSize.php.
|
protected |
Definition at line 62 of file ImageSize.php.
|
protected |
Definition at line 90 of file ImageSize.php.
|
protected |
Definition at line 76 of file ImageSize.php.
|
protected |
Definition at line 104 of file ImageSize.php.
const HEIGHT_TOO_BIG = 'fileImageSizeHeightTooBig' |
Definition at line 42 of file ImageSize.php.
const HEIGHT_TOO_SMALL = 'fileImageSizeHeightTooSmall' |
Definition at line 43 of file ImageSize.php.
const NOT_DETECTED = 'fileImageSizeNotDetected' |
Definition at line 44 of file ImageSize.php.
const NOT_READABLE = 'fileImageSizeNotReadable' |
Definition at line 45 of file ImageSize.php.
const WIDTH_TOO_BIG = 'fileImageSizeWidthTooBig' |
@const string Error constants
Definition at line 40 of file ImageSize.php.
const WIDTH_TOO_SMALL = 'fileImageSizeWidthTooSmall' |
Definition at line 41 of file ImageSize.php.