symfonycontrib / imagefield-bundle
Symfony2 Image Form Field Bundle, extends FileFieldBundle
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 3 087
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Type:symfony-bundle
Requires
- php: >=5.4
- symfony/symfony: ~2.3
- symfonycontrib/filefield-bundle: ~1.0.0
This package is not auto-updated.
Last update: 2024-07-06 13:59:28 UTC
README
This code is part of the SymfonyContrib community.
Symfony2 ImageFieldBundle
Extends the FileFieldBundle to provide additional image specific functionality.
###Features:
- Image preview.
- ...more to come.
Installation
Installation is similar to a standard bundle. http://symfony.com/doc/current/cookbook/bundles/installation.html
- Add bundle to composer.json: https://packagist.org/packages/symfonycontrib/imagefield-bundle
- Add bundle to AppKernel.php:
new SymfonyContrib\Bundle\ImageFieldBundle\ImageFieldBundle(),
- jQuery is required but not provided by this bundle.
- Include JS files (after FileField JS files):
- 'bundles/imagefield/js/jquery.imagefield-ui.js'
Usage
You can simple replace any FileField with an ImageField by changing the field type to 'imagefield'. All options and features of FileField still apply.
$builder->add('photo', 'imagefield', [ ... ]);