_savePropertyValue(self::PROPERTY_WIDTH_ID, $width); $this->_savePropertyValue(self::PROPERTY_HEIGHT_ID, $height); return $this; } public function bindField(Qs_Form $form) { parent::bindField($form); /** * @var Qs_Form_Element_ExtendedImage $element * @var Qs_Sys_Validate_File_IsImage $isImageValidator */ $prefix = $this->getData('formType') != App_FormBuilder_Obj::DEFAULT_FORM_TYPE ? $this->getData('formType') : ''; $name = $prefix . $this->getData('propertyName'); $element = $form->$name; $element->getValidators(); // autoinsert IsImage validator; $isImageValidator = $element->getValidator('IsImage'); $isImageValidator->addMimeType(self::VIDEO_MIME_TYPE); $data = $this->getData(); if ($data && isset($data['width']) && isset($data['height'])) { $element->setResize(array( 'force' => true, 'width' => $data['width'], 'height' => $data['height'], 'method' => 'inner', 'quality' => 94, )); } return $this; } }