Class humhub\models\forms\CropProfileImage

Inheritancehumhub\models\forms\CropProfileImage » yii\base\Model
Available since version0.5

CropProfileImageForm is a form for image cropping.

Will used by user or space profile image cropping.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getPluginOptions() humhub\models\forms\CropProfileImage
rules() Declares the validation rules. humhub\models\forms\CropProfileImage

Property Details

$aspectRatio public property

Image ratio

public integer $aspectRatio 1
$bgColor public property (available since version 1.4)
public string $bgColor 'black'
$bgOpacity public property (available since version 1.4)
public string $bgOpacity '0.5'
$boxWidth public property (available since version 1.4)
public string $boxWidth '440'
$cropH public property

Is the height of the area

public Int $cropH null
$cropSetSelect public property

Crop default position

public array $cropSetSelect = [00100100]
$cropW public property

Is the width of the area

public Int $cropW null
$cropX public property

X Coordinates of the area

public Int $cropX null
$cropY public property

Y Coordinates of the area

public Int $cropY null
$minSize public property (available since version 1.4)
public array $minSize = [5050]
$onChangeJs public property (available since version 1.4)
public string $onChangeJs 'function(c){ $("#cropX").val(c.x);$("#cropY").val(c.y);$("#cropW").val(c.w);$("#cropH").val(c.h); }'

Method Details

getPluginOptions() public method (available since version 1.4)

public array getPluginOptions ( )
rules() public method

Declares the validation rules.

public Array rules ( )
return Array

Validation Rules