ProductImage::behaviors PHP Method

behaviors() public method

public behaviors ( ) : array
return array
    public function behaviors()
    {
        $module = Yii::app()->getModule('store');
        return ['imageUpload' => ['class' => 'yupe\\components\\behaviors\\ImageUploadBehavior', 'attributeName' => 'name', 'minSize' => $module->minSize, 'maxSize' => $module->maxSize, 'types' => $module->allowedExtensions, 'uploadPath' => $module->uploadPath . '/product', 'resizeOnUpload' => true, 'resizeOptions' => ['maxWidth' => 900, 'maxHeight' => 900]]];
    }