public function getConstraints($options)
    {
        $constraints = array();

        if ($options['validate']) {
            $constraints[] = new Image(array(
                'mimeTypes' => array(
                    'image/gif',
                    'image/png',
                    'image/jpg',
                    'image/jpeg'
                ),
                'minWidth'  => $this->calcMin('width', $options),
                'minHeight' => $this->calcMin('height', $options)
            ));
        }

        return $constraints;
    }
public function getConstraints($options)
    {
        $constraints = array();

        if ($options['validate']) {
            $constraints[] = new Image(array(
                'mimeTypes' => array(
                    'image/gif',
                    'image/png',
                    'image/jpg',
                    'image/jpeg'
                ),
                'minWidth'  => $this->calcMin('width', $options),
                'minHeight' => $this->calcMin('height', $options)
            ));
        }

        return $constraints;
    }
public function getConstraints ( $ options ) { $ constraints = array ( ) ; if ( $ options [ 'validate' ] ) { $ constraints [ ] = new Image ( array ( 'mimeTypes' => array ( 'image/gif' , 'image/png' , 'image/jpg' , 'image/jpeg' ) , 'minWidth' => $ this -> calcMin ( 'width' , $ options ) , 'minHeight' => $ this -> calcMin ( 'height' , $ options ) ) ) ; } return $ constraints ; }
Creates and returns constraints for a file field

@param $options
@return array
Creates and returns constraints for a file field