chilldev / file-manager-bundle
File manager bundle for Symfony2.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 450
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 6
Forks: 4
Open Issues: 8
Type:symfony-bundle
Requires
- php: >=5.4
- chilldev/dependency-injection-extra: >=0.0.1
- chilldev/view-helpers-bundle: >=0.1.2
- sensio/framework-extra-bundle: ~2.1
- symfony/config: ~2.1
- symfony/dependency-injection: ~2.1
- symfony/filesystem: ~2.1
- symfony/form: ~2.1
- symfony/framework-bundle: ~2.1
- symfony/http-foundation: ~2.1
- symfony/http-kernel: ~2.1
- symfony/monolog-bundle: ~2.1
- symfony/options-resolver: ~2.1
- symfony/security: ~2.1
- symfony/validator: ~2.1
Requires (Dev)
- chilldev/proxy-templating-bundle: 0.0.3
- mikey179/vfsstream: 1.2.0
- phpmd/phpmd: 1.5.0
- phpunit/phpunit: 3.7.28
- satooshi/php-coveralls: 0.6.1
- sebastian/phpcpd: 2.0.0
- sonata-project/admin-bundle: ~2.2
- sonata-project/block-bundle: >=2.2.1
- squizlabs/php_codesniffer: 1.4.7
Suggests
- chilldev/proxy-templating-bundle: 0.0.3
- sonata-project/admin-bundle: ~2.2
- sonata-project/block-bundle: >=2.2.1
This package is not auto-updated.
Last update: 2019-02-18 11:06:27 UTC
README
ChillDevFileManagerBundle is a Symfony2 bundle that provides file management features from your web application.
Installation
This bundle is provided as Composer package. To install it simply add following dependency definition to your composer.json
file:
"chilldev/file-manager-bundle": "dev-master"
Replace dev-master
with different constraint if you want to use specific version.
If you are using modern version of Symfony2, use dev-develop
version instead of dev-master
. (But this version isn't tested properly yet)
Note: This bundle requires PHP 5.4.
Note: You also need default
templating engine installed and make sure all required bundles are also loaded in your application. See installation instructions for details about that.
Configuration
In order to use this bundle, load it in your kernel:
<?php use ChillDev\Bundle\FileManagerBundle\ChillDevFileManagerBundle; use Symfony\Component\HttpKernel\Kernel as BaseKernel; class Kernel extends BaseKernel { public function registerBundles() { $bundles = [ new ChillDevFileManagerBundle(), ]; } }
Include bundle routes:
ChillDevFileManagerBundle: resource: "@ChillDevFileManagerBundle/Controller/" type: "annotation" prefix: "/filemanager"
And then configure your disks:
chilldev_filemanager: disks: disk_id: label: "Your filesystem" source: "/var/www/"
See configuration options for details.
Usage
Frontend
In general, ChillDevFileManagerBundle is end-user ready (or at least should be) component. However there can be some issues related to frontend presentation that you can be interested in (mainly JavaScript-related). For list of things you need to know to get best experience of this bundle UI see usage documentation.
Actions handlers
Another aspect which you may be interested in is implementing own file actions. You can easily extend ChillDevFileManagerBundle to allow additional file actions (even filetype-specific). You can bind your own action handler to specific MIME type by registring your instances of HandlerInterface
interface:
class MyHandler implements HandlerInterface { public function getLabel() { return 'My action'; } public function supports($mimeType) { return preg_match('#^image/#', $mimeType) > 0; } public function handle(Request $request, Disk $disk, $path) { // handle action request } }
You can read more detailed info here.
Extras
As a bonus, you can integrate ChillDevFileManagerBundle with SonataAdminBundle. You can read about how to do that in this section.
Resources
- Source documentation
- GitHub page with API documentation
- Issues tracker
- Packagist package
- Chillout Development @ GitHub
- Chillout Development @ Facebook
- Post on Wrzasq.pl
Contributing
Do you want to help improving this project? Simply fork it and post a pull request. You can do everything on your own, you don't need to ask if you can, just do all the awesome things you want!
This project is published under MIT license.
Authors
ChillDevFileManagerBundle is brought to you by Chillout Development.
List of contributors: