izapbrasil/fm-rfm-bundle
Composer 安装命令:
composer require izapbrasil/fm-rfm-bundle
包简介
FMRichfilemanager bundle, adds Richfilemanager file manager to your Symfony project
README 文档
README
RichfileManager integration in Symfony
Code Quality Assurance
| TravisCI | License | Version | Downloads |
|---|---|---|---|
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.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-03