symfony-bundle image-crop
Symfony2 Bundle Crop Image Extension
jerni/image-crop
Symfony2 Bundle Crop Image Extension
- Thursday, January 29, 2015
- by jerni
- Repository
- 1 Watchers
- 0 Stars
- 4 Installations
- JavaScript
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
image-crop
enable the bundle:, (*1)
public function registerBundles()
{
$bundles = array(
....
new Jse\ImageCropBundle\JseImageCropBundle(),
);
}
jse_image_crop:
resource: "@JseImageCropBundle/Resources/config/image_crop_routing.xml"
prefix: /
- app\config\parameters.yml
upload_dir: images/uploads
{% include 'JseImageCropBundle:ImageCrop:image_crop.html.twig' %}
<a title="Crop" href="{{ path('jse_image_crop_popup') }}" class="ajax cboxElement">crop</a>
JseImageCropBundle:ImageCrop:image_crop.html.twig
imageCrop.init(width, height);
imageCrop.onsubmit = function(){
// code here
}
imageCrop.callback = function(data){
if(data.saved) {
// code here
} else {
// code here
}
}