helios-ag / fm-rfm-bundle
FMRichfilemanager bundle, adds Richfilemanager file manager to your Symfony project
Installs: 68
Dependents: 0
Suggesters: 2
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 9
Type:symfony-bundle
Requires
- php: ^7.1
- servocoder/richfilemanager: ^2.7
- symfony/asset: ^3.4|^4.0
- symfony/form: ^3.4|^4.0
- symfony/framework-bundle: ^3.4|^4.0
- symfony/twig-bundle: ^3.4|^4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.10
- matthiasnoback/symfony-config-test: ^3.0
- matthiasnoback/symfony-dependency-injection-test: ^2.0
- symfony/finder: ^3.4|^4.0
- symfony/phpunit-bridge: ^4.0
Suggests
- aws/aws-sdk-php: You need AWS PHP SDK for S3 usage
- friendsofsymfony/ckeditor-bundle: CKEditor Bundle
- helios-ag/fm-summernote-bundle: Summernote Bundle
- helios-ag/fm-tinymce-bundle: TinyMCE Bundle
- dev-master / 1.0.x-dev
- 1.0
- 0.1
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/symfony/phpunit-bridge-tw-5.2
- dev-dependabot/composer/symfony/twig-bundle-tw-3.4.x-dev
- dev-dependabot/composer/symfony/framework-bundle-tw-3.4.x-dev
- dev-dependabot/composer/symfony/form-tw-3.4.x-dev
- dev-dependabot/composer/symfony/finder-tw-3.4.x-dev
- dev-dependabot/composer/symfony/asset-tw-3.4.x-dev
- dev-dependabot/composer/matthiasnoback/symfony-dependency-injection-test-tw-2.x-dev
- dev-dependabot/composer/matthiasnoback/symfony-config-test-tw-3.x-dev
This package is auto-updated.
Last update: 2024-10-29 05:41:06 UTC
README
RichfileManager integration in Symfony
Code Quality Assurance
RichfileManager An open-source file manager. http://fm.devale.pro
Table of contents
Installation
Step 1: Installation
Add FMRFMBundle to your composer.json
{ "require": { "helios-ag/fm-rfm-bundle": "~1" } }
If you want to override default assets directory of Richfilemanager, add next option.
By default assets copied to web/assets/richfilemanager
or public/assets/richfilemanager
depending on Symfony version
{ "config": { "rfm-dir": "web/assets/richfilemanager/" } }
Add composer script
"FM\\RFMBundle\\Composer\\RFMScriptHandler::copy",
to scripts section of composer.json
{ "scripts": { "symfony-scripts": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "FM\\RFMBundle\\Composer\\RFMScriptHandler::copy", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ] } }
Also you can copy assets manually. Copy dirs: 'config, 'images', 'languages', 'libs', 'src',
'themes' from vendor/servocoder/richfilemanager/
to your public assets directory
Now tell composer to download the bundle by running the command:
composer update helios-ag/fm-rfm-bundle
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new FM\RFMBundle\FMRFMBundle(), ); }
Step 3: Import FMRFMBundle routing file
# app/config/routing.yml rfm: resource: "@FMRFMBundle/Resources/config/routing.yml"
Step 4: Configure your application's security.yml
Secure RFM with access_control:
# app/config/security.yml security: //.... access_control: - { path: ^/rfm_show, role: ROLE_USER } - { path: ^/rfm_run, role: ROLE_USER } - { path: ^/rfm_config.json, role: ROLE_USER } - { path: ^/rfm_config_default.json, role: ROLE_USER }
Basic configuration
Add configuration options to your config.yml
Example below (assumed that richfilemanager assets placed in web/assets/richfilemanager
directory)
fm_rfm: instances: default: options: serverRoot: true fileRoot: /uploads
You can see the full list of roots options here. To use them, convert camelCased option names to snake_cased names.
Bundle provides custom form type, RFMType (provides same functionality as in FMElfinderBundle) and integration with CKEditor out of the box.