PHP Class Comur\ImageBundle\Controller\UploadController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Mostra file Open project: comur/image-bundle

Public Methods

Method Description
cropImageAction ( Request $request ) Crop image using jCrop and upload config parameters and create thumbs if needed
getLibraryImagesAction ( Request $request ) Returns files from required directory
uploadImageAction ( Request $request ) Save uploaded image according to comur_image field configuration

Private Methods

Method Description
getMaxCropValues ( $srcW, $srcH, $maxW, $maxH ) Calculates and returns maximum size to fit in maxW and maxH for crop
getMaxResizeValues ( $srcW, $srcH, $maxW, $maxH ) Calculates and returns maximum size to fit in maxW and maxH for resize
getMinResizeValues ( $srcW, $srcH, $minW, $minH ) Calculates and returns min size to fit in minW and minH for resize
resizeCropImage ( $destSrc, $imgSrc, $destX, $destY, $srcX, $srcY, $destW, $destH, $srcW, $srcH ) Crops or resizes image and writes it on disk

Method Details

cropImageAction() public method

Crop image using jCrop and upload config parameters and create thumbs if needed
public cropImageAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getLibraryImagesAction() public method

Returns files from required directory
public getLibraryImagesAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

uploadImageAction() public method

Save uploaded image according to comur_image field configuration
public uploadImageAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request