public function onResizeImage()
    {
        $this->abortIfReadOnly();

        $cropSessionKey = Input::get('cropSessionKey');
        if (!preg_match('/^[0-9a-z]+$/', $cropSessionKey)) {
            throw new ApplicationException('Invalid input data');
        }

        $width = trim(Input::get('width'));
        if (!strlen($width) || !ctype_digit($width)) {
            throw new ApplicationException('Invalid input data');
        }

        $height = trim(Input::get('height'));
        if (!strlen($height) || !ctype_digit($height)) {
            throw new ApplicationException('Invalid input data');
        }

        $path = Input::get('path');
        $path = MediaLibrary::validatePath($path);

        $params = array(
            'width' => $width,
            'height' => $height
        );

        return $this->getCropEditImageUrlAndSize($path, $cropSessionKey, $params);
    }
public function onResizeImage()
    {
        $this->abortIfReadOnly();

        $cropSessionKey = Input::get('cropSessionKey');
        if (!preg_match('/^[0-9a-z]+$/', $cropSessionKey)) {
            throw new ApplicationException('Invalid input data');
        }

        $width = trim(Input::get('width'));
        if (!strlen($width) || !ctype_digit($width)) {
            throw new ApplicationException('Invalid input data');
        }

        $height = trim(Input::get('height'));
        if (!strlen($height) || !ctype_digit($height)) {
            throw new ApplicationException('Invalid input data');
        }

        $path = Input::get('path');
        $path = MediaLibrary::validatePath($path);

        $params = array(
            'width' => $width,
            'height' => $height
        );

        return $this->getCropEditImageUrlAndSize($path, $cropSessionKey, $params);
    }
public function onResizeImage ( ) { $ this -> abortIfReadOnly ( ) ; $ cropSessionKey = Input :: get ( 'cropSessionKey' ) ; if ( ! preg_match ( '/^[0-9a-z]+$/' , $ cropSessionKey ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ width = trim ( Input :: get ( 'width' ) ) ; if ( ! strlen ( $ width ) || ! ctype_digit ( $ width ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ height = trim ( Input :: get ( 'height' ) ) ; if ( ! strlen ( $ height ) || ! ctype_digit ( $ height ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ path = Input :: get ( 'path' ) ; $ path = MediaLibrary :: validatePath ( $ path ) ; $ params = array ( 'width' => $ width , 'height' => $ height ) ; return $ this -> getCropEditImageUrlAndSize ( $ path , $ cropSessionKey , $ params ) ; }
Resize image AJAX handler
@return array
Resize image AJAX handler