Showing preview only (339K chars total). Download the full file or copy to clipboard to get everything.
Repository: helios-ag/FMElfinderBundle
Branch: main
Commit: fa0247c4e43d
Files: 81
Total size: 314.6 KB
Directory structure:
gitextract_hjyck40z/
├── .devcontainer/
│ └── devcontainer.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ └── test.yaml
├── .gitignore
├── .php-cs-fixer.php
├── .symfony.bundle.yaml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── composer.json
├── config/
│ ├── command.yaml
│ ├── elfinder.yaml
│ └── form.yaml
├── docs/
│ ├── advanced-configuration.md
│ ├── ckeditor-integration.md
│ ├── configuration-dump.md
│ ├── cors-support.md
│ ├── elfinder-form-type.md
│ ├── events-listeners-subscribers.md
│ ├── flysystem.md
│ ├── summernote-integration.md
│ └── tinymce-integration.md
├── phpunit.xml.dist
├── src/
│ ├── Bridge/
│ │ └── ElFinderBridge.php
│ ├── Command/
│ │ └── ElFinderInstallerCommand.php
│ ├── Configuration/
│ │ ├── ElFinderConfigurationProviderInterface.php
│ │ └── ElFinderConfigurationReader.php
│ ├── Connector/
│ │ └── ElFinderConnector.php
│ ├── Controller/
│ │ └── ElFinderController.php
│ ├── DependencyInjection/
│ │ ├── Compiler/
│ │ │ ├── ElFinderConfigurationPass.php
│ │ │ └── TwigFormPass.php
│ │ ├── Configuration.php
│ │ └── FMElfinderExtension.php
│ ├── ElFinder/
│ │ └── ElFinder.php
│ ├── Event/
│ │ ├── ElFinderPostExecutionEvent.php
│ │ └── ElFinderPreExecutionEvent.php
│ ├── FMElfinderBundle.php
│ ├── Form/
│ │ └── Type/
│ │ └── ElFinderType.php
│ ├── Loader/
│ │ ├── ElFinderLoader.php
│ │ └── ElFinderLoaderInterface.php
│ ├── Resources/
│ │ ├── config/
│ │ │ └── routing.yaml
│ │ ├── public/
│ │ │ └── tinymceElfinder.js
│ │ └── views/
│ │ ├── Elfinder/
│ │ │ ├── ckeditor.html.twig
│ │ │ ├── elfinder_type.html.twig
│ │ │ ├── fm_tinymce.html.twig
│ │ │ ├── helper/
│ │ │ │ ├── _summernote.html.twig
│ │ │ │ ├── _tinymce.html.twig
│ │ │ │ ├── _tinymce4.html.twig
│ │ │ │ ├── _tinymce5.html.twig
│ │ │ │ └── main.js.twig
│ │ │ ├── simple.html.twig
│ │ │ ├── summernote.html.twig
│ │ │ ├── tinymce.html.twig
│ │ │ └── tinymce4.html.twig
│ │ └── Form/
│ │ └── elfinder_widget.html.twig
│ ├── Security/
│ │ └── ElfinderSecurityInterface.php
│ ├── Session/
│ │ └── ElFinderSession.php
│ └── Twig/
│ └── Extension/
│ └── FMElfinderExtension.php
└── tests/
├── Command/
│ └── ElFinderInstallerCommandTest.php
├── Configuration/
│ └── ElFinderConfigurationReaderTest.php
├── DependencyInjection/
│ ├── Compiler/
│ │ └── TwigFormPassTest.php
│ ├── ConfigurationLoadTest.php
│ └── FMElfinderExtensionTest.php
├── Event/
│ ├── ElFinderPostExecutionEventTest.php
│ └── ElFinderPreExecutionEventTest.php
├── FMElfinderBundleTest.php
├── Fixtures/
│ └── config/
│ ├── config.php
│ └── config.yml
├── Form/
│ └── Type/
│ └── ElFinderTypeTest.php
├── Functional/
│ ├── AppKernel.php
│ └── config/
│ ├── config.yml
│ ├── config_test.yml
│ └── routing.yml
├── Loader/
│ └── ElFinderLoaderTest.php
├── Twig/
│ └── Extension/
│ └── FMElfinderExtensionTest.php
├── autoload.php
└── bootstrap.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "FM Elfinder Bundle Dev Container",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/php:0-8.2",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"streetsidesoftware.code-spell-checker"
]
}
}
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
================================================
FILE: .github/ISSUE_TEMPLATE/Bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
Explain what you wanted to do and the wrong result you got.
**To Reproduce**
Steps to reproduce this error and also, the FMElfinderBundle version used.
**(OPTIONAL) Additional context**
If they are useful, include logs, code samples, screenshots, etc.
================================================
FILE: .github/ISSUE_TEMPLATE/Feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
---
**Short description of what this feature will allow to do:**
_(One short paragraph is enough)_
**Example of how to use this feature**
_(Show some PHP code and/or YAML config explaining how to use this feature in a real app)_
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thanks for your contribution! If you are proposing a new feature that is complex,
please open an issue first so we can discuss it.
Note: all your contributions adhere implicitly to the MIT license
-->
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
================================================
FILE: .github/workflows/test.yaml
================================================
# OS: Linux; Symfony: latest stable; PHP: all the commonly used versions supported by this bundle
name: "Tests"
on:
pull_request:
push:
branches:
- 'main'
env:
fail-fast: true
jobs:
tests:
name: "PHP ${{ matrix.php-version }}"
runs-on: 'ubuntu-latest'
continue-on-error: false
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Install PHP with extensions'
uses: shivammathur/setup-php@2.27.1
with:
coverage: xdebug
php-version: ${{ matrix.php-version }}
tools: composer:v2
extensions: mbstring, intl
ini-values: date.timezone=UTC
- name: 'Install project dependencies'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
vendor/bin/simple-phpunit install
- name: 'Run tests'
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./coverage.xml
- name: codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: true # optional (default = false)
================================================
FILE: .gitignore
================================================
composer.lock
Tests/cache
Tests/log
Tests/Functional/cache
Tests/Functional/log
vendor
.php-cs-fixer.cache
clover.xml
.vscode
.phpunit.result.cache
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
/.phpunit.cache
/phpunit.xml
/bin
================================================
FILE: .php-cs-fixer.php
================================================
<?php
return (new PhpCsFixer\Config())
->setRiskyAllowed(false)
->setRules([
'@Symfony' => true,
'@PHP80Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
// one should use PHPUnit methods to set up expected exception instead of annotations
'general_phpdoc_annotation_remove' => [
'annotations' => [
'author',
'package',
'expectedException',
'expectedExceptionMessage',
'expectedExceptionMessageRegExp',
],
],
'function_typehint_space' => false,
'no_empty_phpdoc' => true,
'global_namespace_import' => ['import_classes' => true, 'import_functions' => true, 'import_constants' => true],
'no_superfluous_phpdoc_tags' => ['allow_mixed' => false, 'allow_unused_params' => false],
'phpdoc_line_span' => ['property' => 'single'],
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => ['statements' => ['if', 'break', 'continue', 'declare', 'return', 'throw', 'try', 'yield']],
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block',
],
],
'echo_tag_syntax' => true,
'method_argument_space' => false,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['const', 'class', 'function']],
'php_unit_test_class_requires_covers' => true,
'phpdoc_align' => [
'tags' => [
'param', 'return', 'throws', 'type', 'var'
],
],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_no_alias_tag' => ['replacements' => ['link' => 'website']],
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => false, // breaks psalm-specific notation sometimes!
'semicolon_after_instruction' => true,
'single_blank_line_at_eof' => true,
'single_line_throw' => false,
'types_spaces' => false,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => [
'=' => 'align_single_space_minimal',
'-=' => 'align_single_space_minimal',
'+=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
'===' => null,
'??=' => 'align_single_space_minimal',
],
],
'concat_space' => [
'spacing' => 'one',
],
'operator_linebreak' => ['only_booleans' => true, 'position' => 'end'],
'yoda_style' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
);
================================================
FILE: .symfony.bundle.yaml
================================================
branches: ["main"]
maintained_branches: ["main"]
current_branch: "main"
dev_branch: "main"
dev_branch_alias: "12.x"
doc_dir: "docs/"
================================================
FILE: CHANGELOG.md
================================================
#
## [12.1.2](https://github.com/helios-ag/FMElfinderBundle/tree/12.1.2) (2022-01-21)
**Merged pull requests:**
- Fix elfinder\_tinymce\_init4 duplicate definition [\#473](https://github.com/helios-ag/FMElfinderBundle/pull/473)
## [12.1.1](https://github.com/helios-ag/FMElfinderBundle/tree/12.1.1) (2022-01-21)
**Closed issues:**
- ElFinderType in EasyAdmin 4.x \(with Symfony 6.x\) form shows only a text field [\#472](https://github.com/helios-ag/FMElfinderBundle/issues/472)
- Symfony 6.0 [\#464](https://github.com/helios-ag/FMElfinderBundle/issues/464)
- Deprecation in Symfony 5.4: "...ConfigurationInterface::getConfigTreeBuilder\(\)" might add "TreeBuilder" as a native return type declaration [\#461](https://github.com/helios-ag/FMElfinderBundle/issues/461)
- is can cdn config? [\#460](https://github.com/helios-ag/FMElfinderBundle/issues/460)
- Easyadmin CollectionField not working [\#457](https://github.com/helios-ag/FMElfinderBundle/issues/457)
- Deprecation \(Since Symfony 5.3\) : RegisterListenersPass configuration [\#456](https://github.com/helios-ag/FMElfinderBundle/issues/456)
## [12.1](https://github.com/helios-ag/FMElfinderBundle/tree/12.1) (2022-01-09)
**Closed issues:**
- Considering tagging a new release [\#463](https://github.com/helios-ag/FMElfinderBundle/issues/463)
- Directory removed in public after composer install [\#459](https://github.com/helios-ag/FMElfinderBundle/issues/459)
- Error after all steps \(Symfony 5\) [\#458](https://github.com/helios-ag/FMElfinderBundle/issues/458)
**Merged pull requests:**
- Allow SF6 [\#471](https://github.com/helios-ag/FMElfinderBundle/pull/471)
- Directly inject twig [\#469](https://github.com/helios-ag/FMElfinderBundle/pull/469)
- Added symfony 6 to deps [\#466](https://github.com/helios-ag/FMElfinderBundle/pull/466)
## [11.0](https://github.com/helios-ag/FMElfinderBundle/tree/11.0) (2021-08-29)
**Closed issues:**
- Support implementation of a custom driver class [\#449](https://github.com/helios-ag/FMElfinderBundle/issues/449)
- Lost logged user [\#446](https://github.com/helios-ag/FMElfinderBundle/issues/446)
- Duplicated Bucket Name in Endpoint URL [\#439](https://github.com/helios-ag/FMElfinderBundle/issues/439)
- Unable to run elfinder:install via absolute path [\#431](https://github.com/helios-ag/FMElfinderBundle/issues/431)
- Pass formTypeId to custom editor [\#420](https://github.com/helios-ag/FMElfinderBundle/issues/420)
- Browser hangs when opening folder in form editor [\#413](https://github.com/helios-ag/FMElfinderBundle/issues/413)
- Very slow for large data [\#410](https://github.com/helios-ag/FMElfinderBundle/issues/410)
- Symfony5 - elfinder:install [\#407](https://github.com/helios-ag/FMElfinderBundle/issues/407)
**Merged pull requests:**
- Tinymce5 [\#455](https://github.com/helios-ag/FMElfinderBundle/pull/455)
- Symfony bundle config [\#454](https://github.com/helios-ag/FMElfinderBundle/pull/454)
- Use github CI [\#452](https://github.com/helios-ag/FMElfinderBundle/pull/452)
- Replaced deprecated calls [\#451](https://github.com/helios-ag/FMElfinderBundle/pull/451)
- Improved error message for custom adapter service. [\#448](https://github.com/helios-ag/FMElfinderBundle/pull/448)
- Fix typos in elfinder\_type.html.twig [\#447](https://github.com/helios-ag/FMElfinderBundle/pull/447)
- Upgrade to GitHub-native Dependabot [\#440](https://github.com/helios-ag/FMElfinderBundle/pull/440)
- Add missing constant [\#437](https://github.com/helios-ag/FMElfinderBundle/pull/437)
## [10.1](https://github.com/helios-ag/FMElfinderBundle/tree/10.1) (2021-01-29)
**Closed issues:**
- PHP8.0 and Symfony 5.2 [\#432](https://github.com/helios-ag/FMElfinderBundle/issues/432)
- Cross-Site Scripting reflected [\#430](https://github.com/helios-ag/FMElfinderBundle/issues/430)
- Symfony 4.4 - elfinder:install [\#427](https://github.com/helios-ag/FMElfinderBundle/issues/427)
- Failed to load ressource elfinder.main.js:1 Symfony 5 [\#426](https://github.com/helios-ag/FMElfinderBundle/issues/426)
- Good syntaxe for README [\#421](https://github.com/helios-ag/FMElfinderBundle/issues/421)
- relative\_path missing from doc [\#417](https://github.com/helios-ag/FMElfinderBundle/issues/417)
- Styling issue & missing buttons/text [\#416](https://github.com/helios-ag/FMElfinderBundle/issues/416)
- More one home folder [\#412](https://github.com/helios-ag/FMElfinderBundle/issues/412)
- Add elfinder:install command to composer scripts via flex recipe [\#408](https://github.com/helios-ag/FMElfinderBundle/issues/408)
- ElFinderType in EasyAdmin [\#406](https://github.com/helios-ag/FMElfinderBundle/issues/406)
- Missing upgrade notes? [\#405](https://github.com/helios-ag/FMElfinderBundle/issues/405)
- Blank page displayed [\#402](https://github.com/helios-ag/FMElfinderBundle/issues/402)
- Can't install assets [\#401](https://github.com/helios-ag/FMElfinderBundle/issues/401)
- baseUrl configuration [\#397](https://github.com/helios-ag/FMElfinderBundle/issues/397)
- Combine SF roles and FMElfinderBundle [\#393](https://github.com/helios-ag/FMElfinderBundle/issues/393)
- Unable to make elfinder installing and working on Symfony 4.4 [\#389](https://github.com/helios-ag/FMElfinderBundle/issues/389)
- Image compression [\#380](https://github.com/helios-ag/FMElfinderBundle/issues/380)
- Symfony 5 support [\#377](https://github.com/helios-ag/FMElfinderBundle/issues/377)
**Merged pull requests:**
- Added option to select docroot [\#436](https://github.com/helios-ag/FMElfinderBundle/pull/436)
- Apply fixes from StyleCI [\#435](https://github.com/helios-ag/FMElfinderBundle/pull/435)
- Symfony 5.2 and PHP 8.0 [\#433](https://github.com/helios-ag/FMElfinderBundle/pull/433)
- Apply fixes from StyleCI [\#425](https://github.com/helios-ag/FMElfinderBundle/pull/425)
- Pass formTypeId to custom editor [\#424](https://github.com/helios-ag/FMElfinderBundle/pull/424)
- Fix elfinder:install root dir [\#418](https://github.com/helios-ag/FMElfinderBundle/pull/418)
- Apply fixes from StyleCI [\#415](https://github.com/helios-ag/FMElfinderBundle/pull/415)
- More one home folder [\#411](https://github.com/helios-ag/FMElfinderBundle/pull/411)
- Add support for the quarantine parameter [\#403](https://github.com/helios-ag/FMElfinderBundle/pull/403)
- Update events-listeners-subscribers.md [\#400](https://github.com/helios-ag/FMElfinderBundle/pull/400)
- Fix Yaml syntax issue [\#398](https://github.com/helios-ag/FMElfinderBundle/pull/398)
## [10.0.4](https://github.com/helios-ag/FMElfinderBundle/tree/10.0.4) (2020-02-11)
**Closed issues:**
- AWS S3 upload issue [\#388](https://github.com/helios-ag/FMElfinderBundle/issues/388)
- chunk upload feature [\#358](https://github.com/helios-ag/FMElfinderBundle/issues/358)
**Merged pull requests:**
- yml extensions changed to yaml [\#396](https://github.com/helios-ag/FMElfinderBundle/pull/396)
- Setting MIME reply to text/javascript for mainJS [\#395](https://github.com/helios-ag/FMElfinderBundle/pull/395)
- Using asset\(\) to ensure the URL is correct \(if website not deployed under /\) [\#394](https://github.com/helios-ag/FMElfinderBundle/pull/394)
## [10.0.3](https://github.com/helios-ag/FMElfinderBundle/tree/10.0.3) (2020-01-26)
**Closed issues:**
- S3 Thumbnail issue [\#369](https://github.com/helios-ag/FMElfinderBundle/issues/369)
- Retrieve file name on remove command [\#298](https://github.com/helios-ag/FMElfinderBundle/issues/298)
- Error when selecting a file [\#290](https://github.com/helios-ag/FMElfinderBundle/issues/290)
- Is there any way to disabled/remove some actions based on the user role [\#289](https://github.com/helios-ag/FMElfinderBundle/issues/289)
- Upload failure on symfony 2.7.\* [\#272](https://github.com/helios-ag/FMElfinderBundle/issues/272)
**Merged pull requests:**
- changed path in require and added maxconn option [\#392](https://github.com/helios-ag/FMElfinderBundle/pull/392)
## [10.0.2](https://github.com/helios-ag/FMElfinderBundle/tree/10.0.2) (2020-01-25)
**Merged pull requests:**
- Fixed description for aws [\#391](https://github.com/helios-ag/FMElfinderBundle/pull/391)
- Fixed wrong import [\#390](https://github.com/helios-ag/FMElfinderBundle/pull/390)
## [10.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/10.0.1) (2020-01-14)
**Closed issues:**
- PHP 7.2 Function create\_function\(\) is deprecated [\#376](https://github.com/helios-ag/FMElfinderBundle/issues/376)
- ElFinderLoader::encode\($path\) does not return any valid result [\#368](https://github.com/helios-ag/FMElfinderBundle/issues/368)
- Symfony\Bundle\FrameworkBundle\Controller\Controller is deprecated [\#361](https://github.com/helios-ag/FMElfinderBundle/issues/361)
- The ElfinderController::loadAction never return a Symfony Response [\#352](https://github.com/helios-ag/FMElfinderBundle/issues/352)
- Max upload size [\#311](https://github.com/helios-ag/FMElfinderBundle/issues/311)
- Unable to upload "test.jpg". "test.jpg" transfer error. [\#295](https://github.com/helios-ag/FMElfinderBundle/issues/295)
- Feature request: Add volume icon config. [\#294](https://github.com/helios-ag/FMElfinderBundle/issues/294)
- El finder showing folder not found. [\#286](https://github.com/helios-ag/FMElfinderBundle/issues/286)
- modifity root dir in listener [\#274](https://github.com/helios-ag/FMElfinderBundle/issues/274)
- Error on upload : Unknow command [\#271](https://github.com/helios-ag/FMElfinderBundle/issues/271)
- Unable to override properly the configuration provider - the right way ? [\#257](https://github.com/helios-ag/FMElfinderBundle/issues/257)
**Merged pull requests:**
- Routing file extension changed to yaml [\#387](https://github.com/helios-ag/FMElfinderBundle/pull/387)
- Update flysystem.md [\#386](https://github.com/helios-ag/FMElfinderBundle/pull/386)
## [10](https://github.com/helios-ag/FMElfinderBundle/tree/10) (2020-01-12)
**Merged pull requests:**
- Symfony5 [\#379](https://github.com/helios-ag/FMElfinderBundle/pull/379)
## [9.3.2](https://github.com/helios-ag/FMElfinderBundle/tree/9.3.2) (2019-11-21)
**Closed issues:**
- Summernote insertion of an image or a link to a pdf file [\#372](https://github.com/helios-ag/FMElfinderBundle/issues/372)
- Service as Driver, Driver not found [\#267](https://github.com/helios-ag/FMElfinderBundle/issues/267)
- How to set s3 file acl to public-read after upload? [\#259](https://github.com/helios-ag/FMElfinderBundle/issues/259)
**Merged pull requests:**
- Update twig extension to use supported Twig classes instead of legacy ones [\#374](https://github.com/helios-ag/FMElfinderBundle/pull/374)
- PDF fix \#372 [\#373](https://github.com/helios-ag/FMElfinderBundle/pull/373)
- Replaced old templates for gh issues [\#371](https://github.com/helios-ag/FMElfinderBundle/pull/371)
- Removed deprecated settings [\#370](https://github.com/helios-ag/FMElfinderBundle/pull/370)
- Update README.md [\#367](https://github.com/helios-ag/FMElfinderBundle/pull/367)
## [9.3.1](https://github.com/helios-ag/FMElfinderBundle/tree/9.3.1) (2019-07-28)
**Merged pull requests:**
- Apply fixes from StyleCI [\#366](https://github.com/helios-ag/FMElfinderBundle/pull/366)
- This is to add an opportunity for injecting S3 options like ACL permissions [\#365](https://github.com/helios-ag/FMElfinderBundle/pull/365)
- Allow endpoint and path-style endpoint configuration for aws\_s3\_v3 [\#362](https://github.com/helios-ag/FMElfinderBundle/pull/362)
## [9.3](https://github.com/helios-ag/FMElfinderBundle/tree/9.3) (2019-05-11)
**Closed issues:**
- How to remove toolbar / hide tollbar : Any idea [\#356](https://github.com/helios-ag/FMElfinderBundle/issues/356)
- Help: multiple: true for multiple slection [\#355](https://github.com/helios-ag/FMElfinderBundle/issues/355)
- Modify the path dynamically [\#354](https://github.com/helios-ag/FMElfinderBundle/issues/354)
- Plugins configuration does not work [\#353](https://github.com/helios-ag/FMElfinderBundle/issues/353)
- Symfony 4.2 deprecation: A tree builder without a root node is deprecated [\#346](https://github.com/helios-ag/FMElfinderBundle/issues/346)
- .tmb location [\#345](https://github.com/helios-ag/FMElfinderBundle/issues/345)
**Merged pull requests:**
- Add homeFolder to url [\#359](https://github.com/helios-ag/FMElfinderBundle/pull/359)
- fixed call to a protected member [\#357](https://github.com/helios-ag/FMElfinderBundle/pull/357)
## [9.2.1](https://github.com/helios-ag/FMElfinderBundle/tree/9.2.1) (2019-03-10)
**Closed issues:**
- Mission option tmpPath under onedrive\_setting [\#351](https://github.com/helios-ag/FMElfinderBundle/issues/351)
- Find file by Hash in controller\(backend\) [\#341](https://github.com/helios-ag/FMElfinderBundle/issues/341)
- FIX : Popup elfinder [\#270](https://github.com/helios-ag/FMElfinderBundle/issues/270)
- Option buttons issue in modal [\#266](https://github.com/helios-ag/FMElfinderBundle/issues/266)
- Adding a prompt box when duplicate folders in S3 Volume Driver [\#251](https://github.com/helios-ag/FMElfinderBundle/issues/251)
- Plugin Sanitizer won't work. [\#248](https://github.com/helios-ag/FMElfinderBundle/issues/248)
- Can the parent directories to be set from the URL handled in a better way? [\#244](https://github.com/helios-ag/FMElfinderBundle/issues/244)
**Merged pull requests:**
- Fix tree builder deprecation [\#350](https://github.com/helios-ag/FMElfinderBundle/pull/350)
- Post execution event fix [\#349](https://github.com/helios-ag/FMElfinderBundle/pull/349)
- Travis test [\#348](https://github.com/helios-ag/FMElfinderBundle/pull/348)
- Fix deprecation for symfony/config 4.2+ [\#347](https://github.com/helios-ag/FMElfinderBundle/pull/347)
- Update satooshi/php-coveralls requirement from ~1 to ~2 [\#344](https://github.com/helios-ag/FMElfinderBundle/pull/344)
## [9.2](https://github.com/helios-ag/FMElfinderBundle/tree/9.2) (2018-12-11)
**Merged pull requests:**
- Apply fixes from StyleCI [\#343](https://github.com/helios-ag/FMElfinderBundle/pull/343)
- replaced hash with getpath [\#342](https://github.com/helios-ag/FMElfinderBundle/pull/342)
## [9.1.1](https://github.com/helios-ag/FMElfinderBundle/tree/9.1.1) (2018-11-01)
**Closed issues:**
- How to give upload path for browser server [\#335](https://github.com/helios-ag/FMElfinderBundle/issues/335)
- How can I set privateKey for Flysystem ftp\(sftp\) [\#332](https://github.com/helios-ag/FMElfinderBundle/issues/332)
- Invalid parameters for command "mkdir" [\#288](https://github.com/helios-ag/FMElfinderBundle/issues/288)
**Merged pull requests:**
- Throw not found exception on unknown instance [\#338](https://github.com/helios-ag/FMElfinderBundle/pull/338)
- Explicitly call resize\(\) after registering handler to always trigger resize on first load [\#337](https://github.com/helios-ag/FMElfinderBundle/pull/337)
- Added azure support via flysystem [\#336](https://github.com/helios-ag/FMElfinderBundle/pull/336)
## [9.1](https://github.com/helios-ag/FMElfinderBundle/tree/9.1) (2018-10-10)
**Closed issues:**
- Driver "elFinderVolumeFlysystem" does not exist ? [\#327](https://github.com/helios-ag/FMElfinderBundle/issues/327)
- Options not passed properly with dropbox2 driver ? [\#325](https://github.com/helios-ag/FMElfinderBundle/issues/325)
- Public link from dropbox volume [\#324](https://github.com/helios-ag/FMElfinderBundle/issues/324)
**Merged pull requests:**
- Apply fixes from StyleCI [\#334](https://github.com/helios-ag/FMElfinderBundle/pull/334)
- Separated sftp and ftp settings, added additional fields to sftp [\#333](https://github.com/helios-ag/FMElfinderBundle/pull/333)
- Updated Changelog and referenced version 9 of the bundle in Readme [\#331](https://github.com/helios-ag/FMElfinderBundle/pull/331)
## [9](https://github.com/helios-ag/FMElfinderBundle/tree/9) (2018-10-06)
**Closed issues:**
- Twig error after updating [\#330](https://github.com/helios-ag/FMElfinderBundle/issues/330)
- Problem with uploading image using CKEditor [\#320](https://github.com/helios-ag/FMElfinderBundle/issues/320)
- JqueryUi name mismatch [\#314](https://github.com/helios-ag/FMElfinderBundle/issues/314)
- version 8 doesn't work with symfony-cmf/media-bundle [\#313](https://github.com/helios-ag/FMElfinderBundle/issues/313)
- Using collection form type of elfinder form type not working well [\#310](https://github.com/helios-ag/FMElfinderBundle/issues/310)
- Folder .tmb is locked, unable to move the directory. [\#307](https://github.com/helios-ag/FMElfinderBundle/issues/307)
- Unable to find template "FMElfinderBundle:Form:elfinder\_widget.html.twig" [\#306](https://github.com/helios-ag/FMElfinderBundle/issues/306)
- Notice: Undefined index: instance\_name stfalcon\_tinymce [\#285](https://github.com/helios-ag/FMElfinderBundle/issues/285)
- How to assign a home folder to a user? [\#276](https://github.com/helios-ag/FMElfinderBundle/issues/276)
- Quarantine configuration option invalid. [\#256](https://github.com/helios-ag/FMElfinderBundle/issues/256)
- unable to upload image [\#255](https://github.com/helios-ag/FMElfinderBundle/issues/255)
- Is it able to fetch\(GET\) filename only \(don't want to display thumbnails\) on ELFinder's display [\#243](https://github.com/helios-ag/FMElfinderBundle/issues/243)
**Merged pull requests:**
- Volume drivers [\#329](https://github.com/helios-ag/FMElfinderBundle/pull/329)
- Update configuration to match elfinder volume configuration. [\#326](https://github.com/helios-ag/FMElfinderBundle/pull/326)
- New way to referencing controller [\#323](https://github.com/helios-ag/FMElfinderBundle/pull/323)
- Apply fixes from StyleCI [\#322](https://github.com/helios-ag/FMElfinderBundle/pull/322)
- Changed directory structure [\#321](https://github.com/helios-ag/FMElfinderBundle/pull/321)
- Change default /assets path to assets [\#317](https://github.com/helios-ag/FMElfinderBundle/pull/317)
- Allow Flysystem filesystem service to be injected directly without ex… [\#280](https://github.com/helios-ag/FMElfinderBundle/pull/280)
## [8.0.3](https://github.com/helios-ag/FMElfinderBundle/tree/8.0.3) (2018-05-25)
**Closed issues:**
- Migrate to FOSCKEditorBundle [\#316](https://github.com/helios-ag/FMElfinderBundle/issues/316)
**Merged pull requests:**
- Compatibility to SF4 in FMElfinderExtension.php [\#318](https://github.com/helios-ag/FMElfinderBundle/pull/318)
## [8.0.2](https://github.com/helios-ag/FMElfinderBundle/tree/8.0.2) (2018-05-25)
**Closed issues:**
- Blank Screen?? [\#315](https://github.com/helios-ag/FMElfinderBundle/issues/315)
- Invalid backend configuration. Readable volumes not available [\#312](https://github.com/helios-ag/FMElfinderBundle/issues/312)
- Configure Elfinder Bundle to connect with a MySQL database [\#300](https://github.com/helios-ag/FMElfinderBundle/issues/300)
- Support for "encoding" at fm\_elfinder.instances.instance\_name.connector.roots.connector\_name [\#291](https://github.com/helios-ag/FMElfinderBundle/issues/291)
- srcset possible? [\#264](https://github.com/helios-ag/FMElfinderBundle/issues/264)
- How to preview image and show image thumb? [\#258](https://github.com/helios-ag/FMElfinderBundle/issues/258)
- multiple file select [\#254](https://github.com/helios-ag/FMElfinderBundle/issues/254)
- Use original library studio-42/elfinder [\#247](https://github.com/helios-ag/FMElfinderBundle/issues/247)
- fm-elfinder-php-connector error [\#225](https://github.com/helios-ag/FMElfinderBundle/issues/225)
- wrong assets path requested [\#213](https://github.com/helios-ag/FMElfinderBundle/issues/213)
- Issue with plugins \(with solution\) [\#208](https://github.com/helios-ag/FMElfinderBundle/issues/208)
- Issue for custom service driver \(with solution\) [\#205](https://github.com/helios-ag/FMElfinderBundle/issues/205)
- How to dynamicly create folder ? [\#189](https://github.com/helios-ag/FMElfinderBundle/issues/189)
- Accepted configuration for "attributes" under "roots" is incorrect [\#188](https://github.com/helios-ag/FMElfinderBundle/issues/188)
- Bug on getUrl function with HomeFolder [\#161](https://github.com/helios-ag/FMElfinderBundle/issues/161)
- Backwards slash as directory separator on windows web servers. [\#113](https://github.com/helios-ag/FMElfinderBundle/issues/113)
## [8.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/8.0.1) (2018-04-04)
**Merged pull requests:**
- Fix default encoding parameter value [\#309](https://github.com/helios-ag/FMElfinderBundle/pull/309)
## [8.0](https://github.com/helios-ag/FMElfinderBundle/tree/8.0) (2018-04-01)
**Closed issues:**
- Update to latest version of elFinder [\#301](https://github.com/helios-ag/FMElfinderBundle/issues/301)
- edit twig files [\#287](https://github.com/helios-ag/FMElfinderBundle/issues/287)
- Optional prefix not implemented for flysystem aws\_s3\_v3 adapter [\#237](https://github.com/helios-ag/FMElfinderBundle/issues/237)
**Merged pull requests:**
- Dev [\#308](https://github.com/helios-ag/FMElfinderBundle/pull/308)
## [7.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/7.0.1) (2018-01-22)
**Closed issues:**
- Symfony 4 compatibility [\#299](https://github.com/helios-ag/FMElfinderBundle/issues/299)
- Make bundle compatible with Symfony 4.0 [\#296](https://github.com/helios-ag/FMElfinderBundle/issues/296)
**Merged pull requests:**
- Fixed twig extension for SF4. [\#302](https://github.com/helios-ag/FMElfinderBundle/pull/302)
## [7.0](https://github.com/helios-ag/FMElfinderBundle/tree/7.0) (2017-12-10)
**Closed issues:**
- Multiple AppKernel class [\#282](https://github.com/helios-ag/FMElfinderBundle/issues/282)
- is there any way to disable/enable commands using config.yml [\#281](https://github.com/helios-ag/FMElfinderBundle/issues/281)
- Is is possible to create unique filenames? [\#279](https://github.com/helios-ag/FMElfinderBundle/issues/279)
- Strange characters when inserting images [\#278](https://github.com/helios-ag/FMElfinderBundle/issues/278)
- AutoResize plugin not working [\#277](https://github.com/helios-ag/FMElfinderBundle/issues/277)
- Uploading png works, jpg fails [\#275](https://github.com/helios-ag/FMElfinderBundle/issues/275)
- Symfony 3.x support? [\#273](https://github.com/helios-ag/FMElfinderBundle/issues/273)
- Option: URL [\#268](https://github.com/helios-ag/FMElfinderBundle/issues/268)
- Notice: Undefined variable: header [\#265](https://github.com/helios-ag/FMElfinderBundle/issues/265)
- Unable to connect to backend. [\#262](https://github.com/helios-ag/FMElfinderBundle/issues/262)
- Cant Connect to Backend [\#261](https://github.com/helios-ag/FMElfinderBundle/issues/261)
- enable popup [\#260](https://github.com/helios-ag/FMElfinderBundle/issues/260)
- ckeditor integration [\#221](https://github.com/helios-ag/FMElfinderBundle/issues/221)
- Expand "elfinder" type [\#200](https://github.com/helios-ag/FMElfinderBundle/issues/200)
- Usage of "elfinder" Form Type in version "~6" [\#196](https://github.com/helios-ag/FMElfinderBundle/issues/196)
- Rewrite elfinder form type in pure js [\#102](https://github.com/helios-ag/FMElfinderBundle/issues/102)
**Merged pull requests:**
- Sf4 [\#297](https://github.com/helios-ag/FMElfinderBundle/pull/297)
- Consistent urls [\#293](https://github.com/helios-ag/FMElfinderBundle/pull/293)
- Fix Symfony versions [\#292](https://github.com/helios-ag/FMElfinderBundle/pull/292)
- Apply fixes from StyleCI [\#284](https://github.com/helios-ag/FMElfinderBundle/pull/284)
- Readme patch [\#283](https://github.com/helios-ag/FMElfinderBundle/pull/283)
- Update Readme.md [\#269](https://github.com/helios-ag/FMElfinderBundle/pull/269)
## [6.2.1](https://github.com/helios-ag/FMElfinderBundle/tree/6.2.1) (2016-09-03)
**Merged pull requests:**
- made archivers node optional [\#263](https://github.com/helios-ag/FMElfinderBundle/pull/263)
## [6.2](https://github.com/helios-ag/FMElfinderBundle/tree/6.2) (2016-07-26)
**Closed issues:**
- Againe stop to work!! [\#252](https://github.com/helios-ag/FMElfinderBundle/issues/252)
- Notice: ob\_end\_clean\(\): failed to delete buffer. No buffer to delete \(FlySystem S3 adapter\) [\#249](https://github.com/helios-ag/FMElfinderBundle/issues/249)
- use cumsom theme [\#246](https://github.com/helios-ag/FMElfinderBundle/issues/246)
- Cannot work, still get error: Unable to connect to the backend. [\#241](https://github.com/helios-ag/FMElfinderBundle/issues/241)
- Special characters in filename not allowing to upload files [\#239](https://github.com/helios-ag/FMElfinderBundle/issues/239)
- How to reset the field [\#227](https://github.com/helios-ag/FMElfinderBundle/issues/227)
- Request: Custom Flysystem adapter [\#224](https://github.com/helios-ag/FMElfinderBundle/issues/224)
- Can't create archive. [\#220](https://github.com/helios-ag/FMElfinderBundle/issues/220)
- No callback sync to form field [\#212](https://github.com/helios-ag/FMElfinderBundle/issues/212)
- Send it to Server returns ckeditor instance [\#165](https://github.com/helios-ag/FMElfinderBundle/issues/165)
**Merged pull requests:**
- Improved configuration for archivers support [\#253](https://github.com/helios-ag/FMElfinderBundle/pull/253)
- Use locale from request object if it is not provided in configuration. [\#250](https://github.com/helios-ag/FMElfinderBundle/pull/250)
- add fileMode connector option [\#245](https://github.com/helios-ag/FMElfinderBundle/pull/245)
- add missing documentation [\#242](https://github.com/helios-ag/FMElfinderBundle/pull/242)
- Configuration Reader upated to allow usage of Google Cloud Storage In… [\#240](https://github.com/helios-ag/FMElfinderBundle/pull/240)
## [6.1.2](https://github.com/helios-ag/FMElfinderBundle/tree/6.1.2) (2016-04-26)
**Closed issues:**
- Missing file extension [\#236](https://github.com/helios-ag/FMElfinderBundle/issues/236)
**Merged pull requests:**
- added aws s3 v3 optional\_prefix parameter [\#238](https://github.com/helios-ag/FMElfinderBundle/pull/238)
## [6.1.1](https://github.com/helios-ag/FMElfinderBundle/tree/6.1.1) (2016-03-29)
**Closed issues:**
- When upload image file, elfinder say「unable to connect to backend.」 [\#229](https://github.com/helios-ag/FMElfinderBundle/issues/229)
- Dynamic path doesn't work after upgrading from 5 to 6 [\#228](https://github.com/helios-ag/FMElfinderBundle/issues/228)
**Merged pull requests:**
- wrap jQuery around DOMContentLoaded [\#235](https://github.com/helios-ag/FMElfinderBundle/pull/235)
- Applied fixes from StyleCI [\#233](https://github.com/helios-ag/FMElfinderBundle/pull/233)
- Flysystem custom adapter [\#232](https://github.com/helios-ag/FMElfinderBundle/pull/232)
- Applied fixes from StyleCI [\#231](https://github.com/helios-ag/FMElfinderBundle/pull/231)
- Rackspace driver and allowcustom options [\#230](https://github.com/helios-ag/FMElfinderBundle/pull/230)
## [6.1](https://github.com/helios-ag/FMElfinderBundle/tree/6.1) (2016-02-27)
**Closed issues:**
- Custom Elfinder theme [\#222](https://github.com/helios-ag/FMElfinderBundle/issues/222)
**Merged pull requests:**
- composer tweak, summernote helper blank line added and removed blank … [\#226](https://github.com/helios-ag/FMElfinderBundle/pull/226)
- fixed simple template and improved readme file [\#223](https://github.com/helios-ag/FMElfinderBundle/pull/223)
## [6.0.3](https://github.com/helios-ag/FMElfinderBundle/tree/6.0.3) (2016-02-19)
**Closed issues:**
- Content of Elfinder page is not displayed [\#218](https://github.com/helios-ag/FMElfinderBundle/issues/218)
**Merged pull requests:**
- tmbURL unit test merge fix [\#217](https://github.com/helios-ag/FMElfinderBundle/pull/217)
## [6.0.2](https://github.com/helios-ag/FMElfinderBundle/tree/6.0.2) (2016-01-24)
**Closed issues:**
- Symfony 2.8 Asset folder not find. [\#210](https://github.com/helios-ag/FMElfinderBundle/issues/210)
- How can get url that selected Image? [\#209](https://github.com/helios-ag/FMElfinderBundle/issues/209)
- config Elfinder Form Type have problem [\#204](https://github.com/helios-ag/FMElfinderBundle/issues/204)
- Bad asset path [\#203](https://github.com/helios-ag/FMElfinderBundle/issues/203)
- Used "helios-ag/fm-elfinder-bundle": "~6" shows nothing [\#202](https://github.com/helios-ag/FMElfinderBundle/issues/202)
- Full absolute path to image [\#199](https://github.com/helios-ag/FMElfinderBundle/issues/199)
- How to show only certain mime types from configuration? [\#193](https://github.com/helios-ag/FMElfinderBundle/issues/193)
- Amazon s3 integration [\#191](https://github.com/helios-ag/FMElfinderBundle/issues/191)
**Merged pull requests:**
- Fix case of tmbURL option [\#216](https://github.com/helios-ag/FMElfinderBundle/pull/216)
- file URL double slashes removal + unit tests [\#215](https://github.com/helios-ag/FMElfinderBundle/pull/215)
- CKEditor integration doc homeFolder precision [\#214](https://github.com/helios-ag/FMElfinderBundle/pull/214)
- events doc precision [\#211](https://github.com/helios-ag/FMElfinderBundle/pull/211)
- Used asset function to valid addresses of assets [\#207](https://github.com/helios-ag/FMElfinderBundle/pull/207)
- Replaced {% include %} by {{ include\(\) }} [\#206](https://github.com/helios-ag/FMElfinderBundle/pull/206)
- contributing info [\#201](https://github.com/helios-ag/FMElfinderBundle/pull/201)
- Applied fixes from StyleCI [\#198](https://github.com/helios-ag/FMElfinderBundle/pull/198)
- Patch 1 [\#197](https://github.com/helios-ag/FMElfinderBundle/pull/197)
## [6.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/6.0.1) (2015-12-08)
**Closed issues:**
- Symfony 3.0 [\#190](https://github.com/helios-ag/FMElfinderBundle/issues/190)
**Merged pull requests:**
- Bundle configuration for visible mime types [\#195](https://github.com/helios-ag/FMElfinderBundle/pull/195)
## [6.0](https://github.com/helios-ag/FMElfinderBundle/tree/6.0) (2015-12-06)
**Closed issues:**
- FMElfinderBundle shows white window [\#184](https://github.com/helios-ag/FMElfinderBundle/issues/184)
- fabric.image.fromURL [\#183](https://github.com/helios-ag/FMElfinderBundle/issues/183)
- Access to the encode/decode function From onPreExecute [\#174](https://github.com/helios-ag/FMElfinderBundle/issues/174)
**Merged pull requests:**
- updated readme, before tagging [\#194](https://github.com/helios-ag/FMElfinderBundle/pull/194)
- fixed aws\_s3\_v3 configuration [\#192](https://github.com/helios-ag/FMElfinderBundle/pull/192)
- Applied fixes from StyleCI [\#187](https://github.com/helios-ag/FMElfinderBundle/pull/187)
- \[WIP\] Sf3 [\#179](https://github.com/helios-ag/FMElfinderBundle/pull/179)
## [5.3](https://github.com/helios-ag/FMElfinderBundle/tree/5.3) (2015-11-15)
**Merged pull requests:**
- fm\_tinymce\_bundle [\#182](https://github.com/helios-ag/FMElfinderBundle/pull/182)
## [5.2.1](https://github.com/helios-ag/FMElfinderBundle/tree/5.2.1) (2015-11-12)
**Closed issues:**
- Assets not found [\#180](https://github.com/helios-ag/FMElfinderBundle/issues/180)
**Merged pull requests:**
- Fix paths for elfinder-component 2.0 compatibility [\#181](https://github.com/helios-ag/FMElfinderBundle/pull/181)
## [5.2](https://github.com/helios-ag/FMElfinderBundle/tree/5.2) (2015-11-09)
**Closed issues:**
- Encode / Decode Path [\#169](https://github.com/helios-ag/FMElfinderBundle/issues/169)
- Wrong mime type with flysystem s3 driver [\#164](https://github.com/helios-ag/FMElfinderBundle/issues/164)
- FMElfinderBundle shows nothing [\#159](https://github.com/helios-ag/FMElfinderBundle/issues/159)
- Why this bundle generates Symfony2 doctrine migration file? [\#157](https://github.com/helios-ag/FMElfinderBundle/issues/157)
- Path error with nested folders \(uploads/bob\) [\#152](https://github.com/helios-ag/FMElfinderBundle/issues/152)
- GridFs support ? \(Flysystem / Gaufrette\) [\#145](https://github.com/helios-ag/FMElfinderBundle/issues/145)
- \[bug\] asset can not load from relative path [\#142](https://github.com/helios-ag/FMElfinderBundle/issues/142)
- Dynamic path depending on the user ? [\#138](https://github.com/helios-ag/FMElfinderBundle/issues/138)
- Relative path option not works as expected [\#116](https://github.com/helios-ag/FMElfinderBundle/issues/116)
- How to override the paste method [\#98](https://github.com/helios-ag/FMElfinderBundle/issues/98)
**Merged pull requests:**
- increased number of tests [\#178](https://github.com/helios-ag/FMElfinderBundle/pull/178)
- coveralls support [\#177](https://github.com/helios-ag/FMElfinderBundle/pull/177)
- Access to the encode/decode function From onPreExecute \(2/2\) [\#176](https://github.com/helios-ag/FMElfinderBundle/pull/176)
- readme split [\#175](https://github.com/helios-ag/FMElfinderBundle/pull/175)
- encode/decode access from FMElfinderBundle Loader \(2/2\) [\#172](https://github.com/helios-ag/FMElfinderBundle/pull/172)
- bower component [\#167](https://github.com/helios-ag/FMElfinderBundle/pull/167)
## [5.1](https://github.com/helios-ag/FMElfinderBundle/tree/5.1) (2015-09-24)
**Closed issues:**
- Error - Window does not connect folders [\#158](https://github.com/helios-ag/FMElfinderBundle/issues/158)
- S3 Driver [\#153](https://github.com/helios-ag/FMElfinderBundle/issues/153)
**Merged pull requests:**
- Applied fixes from StyleCI [\#163](https://github.com/helios-ag/FMElfinderBundle/pull/163)
- Summernote support [\#162](https://github.com/helios-ag/FMElfinderBundle/pull/162)
- Events unit tests [\#150](https://github.com/helios-ag/FMElfinderBundle/pull/150)
## [5.0.5](https://github.com/helios-ag/FMElfinderBundle/tree/5.0.5) (2015-07-16)
**Closed issues:**
- Unable to connect to the backend. [\#149](https://github.com/helios-ag/FMElfinderBundle/issues/149)
- Issue with adding images to ckeditor [\#148](https://github.com/helios-ag/FMElfinderBundle/issues/148)
- FMElfinder not created and an input persists [\#146](https://github.com/helios-ag/FMElfinderBundle/issues/146)
- Uncaught TypeError: a.indexOf is not a function \(IvoryCkEditor Insert Image\) [\#144](https://github.com/helios-ag/FMElfinderBundle/issues/144)
- Overriding templates [\#143](https://github.com/helios-ag/FMElfinderBundle/issues/143)
- Table created and not used. [\#141](https://github.com/helios-ag/FMElfinderBundle/issues/141)
- Elfinder Form Type [\#140](https://github.com/helios-ag/FMElfinderBundle/issues/140)
- Disallow creating/uploading new folder [\#139](https://github.com/helios-ag/FMElfinderBundle/issues/139)
- showhidden: false ! [\#136](https://github.com/helios-ag/FMElfinderBundle/issues/136)
- can't access to assets JS and CSS [\#129](https://github.com/helios-ag/FMElfinderBundle/issues/129)
- Plugin ?? [\#127](https://github.com/helios-ag/FMElfinderBundle/issues/127)
- Undefined index: ckeditor [\#121](https://github.com/helios-ag/FMElfinderBundle/issues/121)
**Merged pull requests:**
- region & signature S3 configuration parameters needed [\#156](https://github.com/helios-ag/FMElfinderBundle/pull/156)
- reworked on relative\(absolute from root\) paths [\#154](https://github.com/helios-ag/FMElfinderBundle/pull/154)
- Expose pathPrefix to custom editors [\#151](https://github.com/helios-ag/FMElfinderBundle/pull/151)
- readme small improvements, and newline chars at end of files [\#147](https://github.com/helios-ag/FMElfinderBundle/pull/147)
- Fixed configuration loading of attributes. [\#137](https://github.com/helios-ag/FMElfinderBundle/pull/137)
- Command execution events + subrequests support + volume\_id setting [\#128](https://github.com/helios-ag/FMElfinderBundle/pull/128)
## [5.0.4](https://github.com/helios-ag/FMElfinderBundle/tree/5.0.4) (2015-04-11)
**Merged pull requests:**
- Scrutinizer enabled [\#135](https://github.com/helios-ag/FMElfinderBundle/pull/135)
## [5.0.3](https://github.com/helios-ag/FMElfinderBundle/tree/5.0.3) (2015-04-03)
**Merged pull requests:**
- Allow setting the directoryPerm parameter [\#133](https://github.com/helios-ag/FMElfinderBundle/pull/133)
- Fixed configuration loading for root parameter \(ftp\) [\#132](https://github.com/helios-ag/FMElfinderBundle/pull/132)
## [5.0.2](https://github.com/helios-ag/FMElfinderBundle/tree/5.0.2) (2015-04-02)
**Closed issues:**
- php 5.4 syntax used \(symfony2 and the bundle itself state minimum requirement to \>= php 5.3.3\) [\#130](https://github.com/helios-ag/FMElfinderBundle/issues/130)
- Incorrect path [\#125](https://github.com/helios-ag/FMElfinderBundle/issues/125)
- assetic generation path [\#40](https://github.com/helios-ag/FMElfinderBundle/issues/40)
**Merged pull requests:**
- array short syntax removed [\#131](https://github.com/helios-ag/FMElfinderBundle/pull/131)
## [5.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/5.0.1) (2015-03-23)
**Closed issues:**
- Permission / Override configuration [\#100](https://github.com/helios-ag/FMElfinderBundle/issues/100)
- ReferenceError: $ is not defined [\#87](https://github.com/helios-ag/FMElfinderBundle/issues/87)
**Merged pull requests:**
- Fix bug "pathPrefix" when use Form Type [\#124](https://github.com/helios-ag/FMElfinderBundle/pull/124)
## [5](https://github.com/helios-ag/FMElfinderBundle/tree/5) (2015-03-21)
**Merged pull requests:**
- Component [\#123](https://github.com/helios-ag/FMElfinderBundle/pull/123)
## [4.0.2](https://github.com/helios-ag/FMElfinderBundle/tree/4.0.2) (2015-03-20)
**Closed issues:**
- S3 folder not shown after creation [\#120](https://github.com/helios-ag/FMElfinderBundle/issues/120)
- Path issues and upload [\#118](https://github.com/helios-ag/FMElfinderBundle/issues/118)
- ElFinder and two or more instances with ckeditor [\#117](https://github.com/helios-ag/FMElfinderBundle/issues/117)
- liip image [\#84](https://github.com/helios-ag/FMElfinderBundle/issues/84)
**Merged pull requests:**
- connector options override [\#122](https://github.com/helios-ag/FMElfinderBundle/pull/122)
- S3 example configuration and url fix [\#119](https://github.com/helios-ag/FMElfinderBundle/pull/119)
## [4.0.1](https://github.com/helios-ag/FMElfinderBundle/tree/4.0.1) (2015-02-21)
**Merged pull requests:**
- Added homeFolder parameter to ElFinderType [\#115](https://github.com/helios-ag/FMElfinderBundle/pull/115)
## [4.0](https://github.com/helios-ag/FMElfinderBundle/tree/4.0) (2015-02-18)
###
- Support new drivers via FlySystem [\#105](https://github.com/helios-ag/FMElfinderBundle/issues/105)
**Closed issues:**
- Enable CORS [\#106](https://github.com/helios-ag/FMElfinderBundle/issues/106)
- Wrong url when select the picture [\#99](https://github.com/helios-ag/FMElfinderBundle/issues/99)
- dynamic 'path' setting ? [\#91](https://github.com/helios-ag/FMElfinderBundle/issues/91)
**Merged pull requests:**
- updated README [\#114](https://github.com/helios-ag/FMElfinderBundle/pull/114)
- conv to unix [\#112](https://github.com/helios-ag/FMElfinderBundle/pull/112)
- flysystem driver support [\#111](https://github.com/helios-ag/FMElfinderBundle/pull/111)
- CORS and home folder guides [\#110](https://github.com/helios-ag/FMElfinderBundle/pull/110)
- Multiple upload folder by instance [\#109](https://github.com/helios-ag/FMElfinderBundle/pull/109)
- Non hard exit [\#108](https://github.com/helios-ag/FMElfinderBundle/pull/108)
- Add triggering of change event [\#107](https://github.com/helios-ag/FMElfinderBundle/pull/107)
- overridable loader [\#104](https://github.com/helios-ag/FMElfinderBundle/pull/104)
- IvoryCKEditor sample was incorrect [\#103](https://github.com/helios-ag/FMElfinderBundle/pull/103)
## [3.4](https://github.com/helios-ag/FMElfinderBundle/tree/3.4) (2015-01-20)
**Merged pull requests:**
- Allow custom template renderer [\#97](https://github.com/helios-ag/FMElfinderBundle/pull/97)
## [3.3](https://github.com/helios-ag/FMElfinderBundle/tree/3.3) (2015-01-17)
**Closed issues:**
- Relative path image [\#93](https://github.com/helios-ag/FMElfinderBundle/issues/93)
- attach files? [\#90](https://github.com/helios-ag/FMElfinderBundle/issues/90)
- There is no "uglifycss" filter [\#77](https://github.com/helios-ag/FMElfinderBundle/issues/77)
**Merged pull requests:**
- Fix test [\#96](https://github.com/helios-ag/FMElfinderBundle/pull/96)
- plugin\_support [\#95](https://github.com/helios-ag/FMElfinderBundle/pull/95)
## [3.2.1](https://github.com/helios-ag/FMElfinderBundle/tree/3.2.1) (2015-01-06)
**Merged pull requests:**
- tinymce relative path [\#94](https://github.com/helios-ag/FMElfinderBundle/pull/94)
## [3.2](https://github.com/helios-ag/FMElfinderBundle/tree/3.2) (2014-12-28)
**Closed issues:**
- add class. ``form-control`` [\#88](https://github.com/helios-ag/FMElfinderBundle/issues/88)
**Merged pull requests:**
- Assetic [\#92](https://github.com/helios-ag/FMElfinderBundle/pull/92)
## [2.3.3](https://github.com/helios-ag/FMElfinderBundle/tree/2.3.3) (2014-12-06)
**Closed issues:**
- multi path folder. [\#86](https://github.com/helios-ag/FMElfinderBundle/issues/86)
- get error - Undefined index: ckeditor - [\#85](https://github.com/helios-ag/FMElfinderBundle/issues/85)
- Elfinder form type in form type collection [\#81](https://github.com/helios-ag/FMElfinderBundle/issues/81)
- BC between 2.5 and 2.5.1 [\#80](https://github.com/helios-ag/FMElfinderBundle/issues/80)
- Feature Request: ability to inject the VolumeDriver as a Service [\#66](https://github.com/helios-ag/FMElfinderBundle/issues/66)
**Merged pull requests:**
- Noassetic [\#89](https://github.com/helios-ag/FMElfinderBundle/pull/89)
## [3.1](https://github.com/helios-ag/FMElfinderBundle/tree/3.1) (2014-11-09)
**Closed issues:**
- Customizing Elfinder form [\#82](https://github.com/helios-ag/FMElfinderBundle/issues/82)
- Request : change the folder path [\#68](https://github.com/helios-ag/FMElfinderBundle/issues/68)
**Merged pull requests:**
- restored ability to use services as drivers [\#83](https://github.com/helios-ag/FMElfinderBundle/pull/83)
## [3.0](https://github.com/helios-ag/FMElfinderBundle/tree/3.0) (2014-11-07)
**Closed issues:**
- unable to add symfony service as a volume driver [\#79](https://github.com/helios-ag/FMElfinderBundle/issues/79)
**Merged pull requests:**
- Update README.md [\#78](https://github.com/helios-ag/FMElfinderBundle/pull/78)
## [2.3.2](https://github.com/helios-ag/FMElfinderBundle/tree/2.3.2) (2014-10-29)
**Merged pull requests:**
- Made the changes of patch 2.5.1 available in 2.3 [\#76](https://github.com/helios-ag/FMElfinderBundle/pull/76)
## [2.5.1](https://github.com/helios-ag/FMElfinderBundle/tree/2.5.1) (2014-10-24)
**Closed issues:**
- How to disable command? [\#74](https://github.com/helios-ag/FMElfinderBundle/issues/74)
- Injecting Non existent Service Symfony \<=2.3 [\#71](https://github.com/helios-ag/FMElfinderBundle/issues/71)
- Symfony version in composer.json [\#61](https://github.com/helios-ag/FMElfinderBundle/issues/61)
**Merged pull requests:**
- Multiple elfinder instances in one page/form [\#75](https://github.com/helios-ag/FMElfinderBundle/pull/75)
## [2.5](https://github.com/helios-ag/FMElfinderBundle/tree/2.5) (2014-10-11)
## [2.3.1](https://github.com/helios-ag/FMElfinderBundle/tree/2.3.1) (2014-10-10)
## [2.3.0](https://github.com/helios-ag/FMElfinderBundle/tree/2.3.0) (2014-10-03)
**Closed issues:**
- Relative path in 'form' instance [\#72](https://github.com/helios-ag/FMElfinderBundle/issues/72)
- Unrecognized options "instances" under "fm\_elfinder" [\#67](https://github.com/helios-ag/FMElfinderBundle/issues/67)
**Merged pull requests:**
- Fix dialog icons css [\#73](https://github.com/helios-ag/FMElfinderBundle/pull/73)
- showhidden in another node [\#70](https://github.com/helios-ag/FMElfinderBundle/pull/70)
- Required only necessary dependencies [\#69](https://github.com/helios-ag/FMElfinderBundle/pull/69)
## [2.1](https://github.com/helios-ag/FMElfinderBundle/tree/2.1) (2014-08-24)
**Closed issues:**
- Upload file window [\#65](https://github.com/helios-ag/FMElfinderBundle/issues/65)
- Change of image URL [\#64](https://github.com/helios-ag/FMElfinderBundle/issues/64)
## [v2.0](https://github.com/helios-ag/FMElfinderBundle/tree/v2.0) (2014-08-09)
**Closed issues:**
- DataFixtures error? [\#62](https://github.com/helios-ag/FMElfinderBundle/issues/62)
- \[Insight\] The Symfony Dependency Injection Container should not be passed as an argument [\#57](https://github.com/helios-ag/FMElfinderBundle/issues/57)
- Image absolute/relative path [\#56](https://github.com/helios-ag/FMElfinderBundle/issues/56)
**Merged pull requests:**
- Wrap READ and WRITE columns in quotes [\#63](https://github.com/helios-ag/FMElfinderBundle/pull/63)
- 2.0 [\#60](https://github.com/helios-ag/FMElfinderBundle/pull/60)
- Update composer.json [\#59](https://github.com/helios-ag/FMElfinderBundle/pull/59)
- Update ElFinderFile.php [\#58](https://github.com/helios-ag/FMElfinderBundle/pull/58)
## [1.5](https://github.com/helios-ag/FMElfinderBundle/tree/1.5) (2014-05-09)
**Closed issues:**
- Standalone elfinder [\#55](https://github.com/helios-ag/FMElfinderBundle/issues/55)
- Is or will be there a way to set metadata for media files in elfinder? [\#54](https://github.com/helios-ag/FMElfinderBundle/issues/54)
- S3 integration [\#53](https://github.com/helios-ag/FMElfinderBundle/issues/53)
- ElFinder resize doesn't update image dimensions [\#52](https://github.com/helios-ag/FMElfinderBundle/issues/52)
- config error - parse asset\[bundles/stfalcontinymce/vendor/ [\#48](https://github.com/helios-ag/FMElfinderBundle/issues/48)
## [1.4.2](https://github.com/helios-ag/FMElfinderBundle/tree/1.4.2) (2013-12-19)
**Merged pull requests:**
- Add a Bitdeli Badge to README [\#51](https://github.com/helios-ag/FMElfinderBundle/pull/51)
## [1.4.1](https://github.com/helios-ag/FMElfinderBundle/tree/1.4.1) (2013-11-13)
**Closed issues:**
- Hi [\#46](https://github.com/helios-ag/FMElfinderBundle/issues/46)
- default \(ckeditor\) template requires yui\_css and yui\_js filters [\#44](https://github.com/helios-ag/FMElfinderBundle/issues/44)
- Configuration of elfinder path [\#42](https://github.com/helios-ag/FMElfinderBundle/issues/42)
- Problems with dump assets image path and CSSEMBED [\#34](https://github.com/helios-ag/FMElfinderBundle/issues/34)
**Merged pull requests:**
- document new config options, fix ckeditor compressed template [\#50](https://github.com/helios-ag/FMElfinderBundle/pull/50)
- Use request locale as default [\#49](https://github.com/helios-ag/FMElfinderBundle/pull/49)
## [1.4](https://github.com/helios-ag/FMElfinderBundle/tree/1.4) (2013-10-03)
**Closed issues:**
- Cannot rename files/folders [\#45](https://github.com/helios-ag/FMElfinderBundle/issues/45)
- Installation problem [\#41](https://github.com/helios-ag/FMElfinderBundle/issues/41)
- so slow ? [\#35](https://github.com/helios-ag/FMElfinderBundle/issues/35)
**Merged pull requests:**
- Cmf [\#47](https://github.com/helios-ag/FMElfinderBundle/pull/47)
- fix dialog image position [\#43](https://github.com/helios-ag/FMElfinderBundle/pull/43)
## [1.3](https://github.com/helios-ag/FMElfinderBundle/tree/1.3) (2013-08-27)
**Closed issues:**
- no \_popup.js in STFalconTinyMCE public resources [\#39](https://github.com/helios-ag/FMElfinderBundle/issues/39)
- typo? in docs - step 3 [\#38](https://github.com/helios-ag/FMElfinderBundle/issues/38)
- in Prod mode error 500 [\#36](https://github.com/helios-ag/FMElfinderBundle/issues/36)
- Integration with Tinymce 4 [\#33](https://github.com/helios-ag/FMElfinderBundle/issues/33)
- Standalone filebrowser usage [\#28](https://github.com/helios-ag/FMElfinderBundle/issues/28)
**Merged pull requests:**
- Tinymce4 [\#37](https://github.com/helios-ag/FMElfinderBundle/pull/37)
## [1.2](https://github.com/helios-ag/FMElfinderBundle/tree/1.2) (2013-08-03)
**Closed issues:**
- RangeError when loading elfinder [\#31](https://github.com/helios-ag/FMElfinderBundle/issues/31)
**Merged pull requests:**
- Fix \#31 Uncaught RangeError: Maximum call stack size exceeded in some browsers [\#32](https://github.com/helios-ag/FMElfinderBundle/pull/32)
- added feature to use a symfony service as a volumeDriver [\#30](https://github.com/helios-ag/FMElfinderBundle/pull/30)
- Added support for an optional 'url' parameter in the 'roots' section [\#29](https://github.com/helios-ag/FMElfinderBundle/pull/29)
## [1.1](https://github.com/helios-ag/FMElfinderBundle/tree/1.1) (2013-06-12)
**Closed issues:**
- Dependency twig-bundle is wrong for SF 2.3 [\#26](https://github.com/helios-ag/FMElfinderBundle/issues/26)
- Image path in CSS are broken [\#25](https://github.com/helios-ag/FMElfinderBundle/issues/25)
**Merged pull requests:**
- Issues \#25 & \#26 fix [\#27](https://github.com/helios-ag/FMElfinderBundle/pull/27)
## [1.0](https://github.com/helios-ag/FMElfinderBundle/tree/1.0) (2013-06-07)
**Closed issues:**
- Missing icon images [\#23](https://github.com/helios-ag/FMElfinderBundle/issues/23)
- CSS generation with assetic [\#20](https://github.com/helios-ag/FMElfinderBundle/issues/20)
- Variable "fullscreen" does not exist and images not loading [\#17](https://github.com/helios-ag/FMElfinderBundle/issues/17)
- Elfinder slow loading [\#15](https://github.com/helios-ag/FMElfinderBundle/issues/15)
- Bad asset URL [\#14](https://github.com/helios-ag/FMElfinderBundle/issues/14)
- Standalone filebrowser [\#13](https://github.com/helios-ag/FMElfinderBundle/issues/13)
- Javascripts missing [\#12](https://github.com/helios-ag/FMElfinderBundle/issues/12)
- Dependency error [\#11](https://github.com/helios-ag/FMElfinderBundle/issues/11)
- Overriding FMElfinderLoader [\#9](https://github.com/helios-ag/FMElfinderBundle/issues/9)
- Assetic cssrewrite css image path [\#3](https://github.com/helios-ag/FMElfinderBundle/issues/3)
- Browse Image Return Value in Integration with CKEditor [\#2](https://github.com/helios-ag/FMElfinderBundle/issues/2)
- install error [\#1](https://github.com/helios-ag/FMElfinderBundle/issues/1)
**Merged pull requests:**
- Fix for images in CSS for newer version of AsseticBundle and cssrewriter [\#24](https://github.com/helios-ag/FMElfinderBundle/pull/24)
- fix templates & filters for assetic [\#22](https://github.com/helios-ag/FMElfinderBundle/pull/22)
- Update compiled path for assetic js & css [\#21](https://github.com/helios-ag/FMElfinderBundle/pull/21)
- fullscreen option [\#18](https://github.com/helios-ag/FMElfinderBundle/pull/18)
- El finder php [\#16](https://github.com/helios-ag/FMElfinderBundle/pull/16)
- Integration with TinyMCE bundle [\#10](https://github.com/helios-ag/FMElfinderBundle/pull/10)
- Update README.md [\#8](https://github.com/helios-ag/FMElfinderBundle/pull/8)
- TinyMCE integration + Multiple roots configuration [\#6](https://github.com/helios-ag/FMElfinderBundle/pull/6)
- Elfinder fullscreen [\#5](https://github.com/helios-ag/FMElfinderBundle/pull/5)
- Ckeditor integration fix [\#4](https://github.com/helios-ag/FMElfinderBundle/pull/4)
================================================
FILE: CONTRIBUTING.md
================================================
Contribution Guidelines
=======================
First of all, each single contribution is appreciated, whether a typo fix,
improved documentation, a fixed bug or a whole new feature.
## Making your changes
1. Fork the repository on GitHub
2. Pull requests must be sent from a new hotfix/feature branch, not from `master`.
3. Make your modifications, coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
4. Commit small logical changes, each with a descriptive commit message.
Please don't mix unrelated changes in a single commit.
## Commit messages
Please format your commit messages as follows:
Short summary of the change (up to 50 characters)
Optionally add a more extensive description of your change after a
blank line. Wrap the lines in this and the following paragraphs after
72 characters.
## Submitting your changes
1. Push your changes to a topic branch in your fork of the repository.
2. [Submit a pull request][pr] to the original repository.
Describe your changes as short as possible, but as detailed as needed for
others to get an overview of your modifications.
## Further information
* [General GitHub documentation][gh-help]
* [GitHub pull request documentation][gh-pr]
[gh-help]: https://help.github.com
[gh-pr]: https://help.github.com/send-pull-requests
[issue]: https://github.com/helios-ag/FMElfinderBundle/issues/new
[pr]: https://github.com/helios-ag/FMElfinderBundle/pull/new
================================================
FILE: LICENSE
================================================
Copyright (c) 2012- Al Ganiev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
FMElfinderBundle
================
[ElFinder](https://github.com/Studio-42/elFinder) integration in Symfony
### Code Quality Assurance ###
| Tests | Coverage| License | Version |
|-------------|-----------------|-----------------|----------------|
|[](https://github.com/helios-ag/FMElfinderBundle/actions/workflows/test.yaml)|[](https://codecov.io/gh/helios-ag/FMElfinderBundle)|[](LICENSE)|[](https://packagist.org/packages/helios-ag/fm-elfinder-bundle)|
| Downloads |
|----------|
|[](https://packagist.org/packages/helios-ag/fm-elfinder-bundle)|
**elFinder** is an open-source file manager for web, written in JavaScript using jQuery UI.
Creation is inspired by simplicity and convenience of Finder program used in Mac OS X operating system.
Recommended bundles to use with:
| FMTinyMCEBundle | FOSCKEditorBundle | FMSummernoteBundle |
| ------------------------|-------------|-----------------|
|[](https://github.com/helios-ag/FMTinyMCEBundle)|[](https://github.com/FriendsOfSymfony/FOSCKEditorBundle)|[](https://github.com/helios-ag/summernote-bundle)|
**Table of contents**
- [Installation](#installation)
- [Step 1: Installation](#step-1-installation)
- [Step 2: Enable the bundle](#step-2-enable-the-bundle-optional)
- [Step 3: Import FMElfinderBundle routing file](#step-3-import-fmelfinderbundle-routing-file)
- [Step 4: Securing paths](#step-4-configure-your-applications-securityyaml)
- [Basic configuration](#basic-configuration)
- [Add configuration options to your config.yaml](#add-configuration-options-to-your-configyaml)
- [Use multiple upload folder by instance](#use-multiple-upload-folder-by-instance)
- [CORS support](/docs/cors-support.md)
- [Events listeners / subscribers](/docs/events-listeners-subscribers.md)
- [Events](/docs/events-listeners-subscribers.md#events)
- [Sub requests](/docs/events-listeners-subscribers.md#sub-requests)
- [Elfinder Form Type](/docs/elfinder-form-type.md)
- [Configuration](/docs/elfinder-form-type.md#configuration)
- [EasyAdmin 2.x](/docs/elfinder-form-type.md#easyadmin-2x-integration)
- [EasyAdmin 3.x/4.x](/docs/elfinder-form-type.md#easyadmin-3x/4x-integration)
- [CKEditor integration](/docs/ckeditor-integration.md)
- [Installation](/docs/ckeditor-integration.md#step-1-installation)
- [Configuration](/docs/ckeditor-integration.md#step-2-configure-ckeditor-setting-via-settingsyml-or-through-form-builder)
- [TinyMCE integration](/docs/tinymce-integration.md)
- [Integration with TinyMCE 3](/docs/tinymce-integration.md#tinymce-3x)
- [Integration with TinyMCE 4](/docs/tinymce-integration.md#tinymce-4x)
- [Summernote integration](/docs/summernote-integration.md)
- [Advanced configuration](/docs/advanced-configuration.md)
- [Custom configuration provider](/docs/advanced-configuration.md#custom-configuration-provider)
- [Custom loader](/docs/advanced-configuration.md#custom-loader)
- [Plugins](/docs/advanced-configuration.md#plugins)
- [Service as volume driver](/docs/advanced-configuration.md#symfony-service-as-a-volume-driver)
- [Flysystem configuration](/docs/advanced-configuration.md#flysystem-configuration)
- [Configuration dump](/docs/configuration-dump.md)
## Installation
### Step 1: Installation
For Symfony Flex installation you need to enable community recipes:
```sh
composer config extra.symfony.allow-contrib true
```
Install
```sh
composer require helios-ag/fm-elfinder-bundle
```
Copy elfinder assets to public folder
```sh
bin/console elfinder:install
```
### Step 2: Enable the bundle (Optional)
Enable the bundle in the kernel (not needed with symfony flex):
```php
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new FM\ElfinderBundle\FMElfinderBundle(),
);
}
```
### Step 3: Import FMElfinderBundle routing file
``` yaml
# app/config/routing.yaml
elfinder:
resource: "@FMElfinderBundle/Resources/config/routing.yaml"
```
### Step 4: Configure your application's security.yaml
Secure ElFinder with access_control:
``` yaml
# app/config/security.yaml
security:
//....
access_control:
- { path: ^/efconnect, role: ROLE_USER }
- { path: ^/elfinder, role: ROLE_USER }
```
## Basic configuration
### Add configuration options to your config.yaml
```yaml
fm_elfinder:
#assets_path: / # default is /assets, this is where css/js elfinder files are
instances:
default:
locale: '%locale%' # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce, form, simple, custom
relative_path: false #default true, will produce absolute urls to specified file(s)
#editor_template: custom template for your editor # default null
#path_prefix: / # for setting custom assets path prefix, useful for non vhost configurations, i.e. http://127.0.0.1/mysite/
#fullscreen: true|false # default is true, applies to simple and ckeditor editors
#theme: smoothness # jquery theme, default is 'smoothness'
#visible_mime_types: ['image/png', 'image/jpg', 'image/jpeg'] # only show these mime types, defaults to show all
connector:
#debug: true|false # defaults to false
roots: # at least one root must be defined, defines root filemanager directories
uploads:
#show_hidden: true|false # defaults to false, hides dotfiles
driver: LocalFileSystem
path: uploads
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M # also file upload sizes restricted in php.ini
#attributes: example of setting attributes permission
# - { pattern: '/(.*?)/', read: true, write: false, locked: true }
```
* **default** - instance of elfinder, can be used to define multiple configurations of ElFinder, allows simultaneous configuration for different types of WYSIWYG editors in your project
* **path** - define root directory for the files inside web/ directory, default is "uploads". Make sure to set proper write/read and owner permissions to this directory.
* **url** - url to be prefixed to image path, for displaying. Can be either `absolute` or `relative`. If absolute, you can use `{homeFolder}` string as placeholder which will be replaced automatically. If relative, it will be prefixed with the applications base-url. If left blank, url will be the base-url, append with the value of the 'path' parameter
* **driver** - can be LocalFileSystem, FTP or MySQL, Flysystem, S3 and etc, check class FM\ElfinderBundle\DependencyInjection\Configuration
* **locale** - locale determines, which language, ElFinder will use, to translate user interface, default is current request locale
* **cors_support** - allows cross domain responses handling (default false)
* **editor** - determines what template to render, to be compatible with WYSIWYG web editor, currently supported options are:
"ckeditor" (to use with FOSCKEditorBundle or TrsteelCkeditorBundle), "fm_tinymce" for tinymce4 (to use with FMTinyMCEBundle), "form" for form type, "simple" for standalone and "custom" for custom template.
How to configure CKEDitor and TinyMCE to work with this bundle, will be explained further in this document.
* **editor_template** - define template to render when editor is set to "custom".
* **connector** - root node for defining options for elfinder root directories.
* **roots** - define "virtual directories" that reflect directories in your project.
* **path_prefix** - path prefix with relative_path enabled, default is slash ('/')
* **show_hidden** - show files and folders that starts from . (dot)
* **driver** - driver type, LocalFileSystem, Dropbox, FTP
* **volume_id** - (optional) can be used to force a volume id when mounting volume (default auto-increments). If provided, it must be an integer bigger than 0.
* **alias** - directory alias
* **path** - directory that contains files
* **upload_allow**: ['image/png', 'image/jpg', 'image/jpeg']
* **upload_deny**: ['all']
* **upload_max_size**: 2M
You can see the full list of roots options [here](https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options#root-options "connector options list"). To use them,
convert camelCased option name to snake_case name.
### Use multiple upload folder by instance
You can set multiple upload root folder by instance configuration.
If you have configured your instance with `/uploads` path, you can provide
an additional folder as a home folder (e.g. for a multi-users application) when accessing to the instance URL :
`/elfinder/{instance}/{homeFolder}` or `/efconnect/{instance}/{homeFolder}`
For example, accessing to `/elfinder/acmeInstance/bob` URL will open up elfinder with
`/uploads/bob` as root directory which only contains Bob's files.
Then, accessing to `/elfinder/acmeInstance/alice` URL will re-use your instance,
but open up elfinder with `/uploads/alice` folder as root directory, containing only Alice's files.
To use this feature, you **must** provide the instance name in the URL,
and of course be sure to set proper write/read permissions on home folders.
**Note:** this feature is only available with `LocalFileSystem` driver.
## If I want more one home folder is possible ?
Yes you can with this configuration in your fm_elfinder.yaml
```yaml
where_is_multi:
{connector}: {index of the connector}
multi_home_folder: true
folder_separator: {one char other of /}
```
### Example
```
fm_elfinder:
instances:
default:
locale: fr # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce, form, simple, custom
#editor_template: custom template for your editor # default null
#path_prefix: http://localhost/ # for setting custom assets path prefix, useful for non vhost configurations, i.e. http://127.0.0.1/mysite/
fullscreen: false # default is true, applies to simple and ckeditor editors
where_is_multi:
roots: 0
multi_home_folder: true
folder_separator: "|"
#theme: smoothness # jquery theme, default is 'smoothness'
#visible_mime_types: ['image/png', 'image/jpg', 'image/jpeg'] # only show these mime types, defaults to show all
connector:
#debug: true|false # defaults to false
roots: # at least one root must be defined, defines root filemanager directories
uploads:
#show_hidden: true|false # defaults to false, hides dotfiles
driver: LocalFileSystem
path: "/var"
alias: Bibliothèque générale
upload_allow: ['all']
#upload_deny: ['all']
upload_max_size: 500M # also file upload sizes restricted in php.ini
attributes:
- {pattern: '..', read: true, write: true, locked: false}
#attributes: example of setting attributes permission
# - { pattern: '/(.*?)/', read: true, write: false, locked: true }
```
================================================
FILE: composer.json
================================================
{
"name": "helios-ag/fm-elfinder-bundle",
"description": "ElFinder bundle, adds ElFinder file manager to your Symfony project",
"keywords": ["elfinder", "file manager", "wysiwyg"],
"type": "symfony-bundle",
"homepage": "https://github.com/helios-ag/FMElfinderBundle",
"minimum-stability": "dev",
"license": "MIT",
"authors": [
{
"name": "Al Ganiev",
"email": "helios.ag@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/helios-ag/FMElfinderBundle/contributors"
}
],
"archive": {
"exclude": ["/tests", "./github"]
},
"require": {
"php": "^8.1",
"ext-json": "*",
"symfony/console": "^6.4 || ^7.0 || ^8.0",
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/twig-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/form": "^6.4 || ^7.0 || ^8.0",
"symfony/asset": "^6.4 || ^7.0 || ^8.0",
"studio-42/elfinder": "~2.1.62"
},
"require-dev" : {
"symfony/phpunit-bridge": "^6.4 || ^7.0.1 || ^8.0",
"matthiasnoback/symfony-config-test": "^6.0",
"matthiasnoback/symfony-dependency-injection-test": "^6.0",
"symfony/finder": "^6.4 || ^7.0 || ^8.0",
"php-coveralls/php-coveralls": "^2.0",
"friendsofphp/php-cs-fixer": "dev-master"
},
"suggest": {
"helios-ag/fm-tinymce-bundle": "FMTinyMCEBundle WYSIWYG Editor Bundle",
"helios-ag/fm-summernote-bundle": "FMSummernoteBundle WYSIWYG Editor Bundle",
"friendsofsymfony/ckeditor-bundle": "FOSCKEditorBundle WYSIWYG Editor Bundle",
"barryvdh/elfinder-flysystem-driver": "Flysystem driver for elfinder",
"spatie/flysystem-dropbox": "Dropbox 2 Driver for Flysystem"
},
"config": {
"sort-packages": true,
"preferred-install": {
"symfony/doctrine-bridge": "source",
"*": "dist"
},
"allow-plugins": {
"composer/installers": true,
"composer/package-versions-deprecated": true,
"oomphinc/composer-installers-extender": true
}
},
"autoload": {
"psr-4": { "FM\\ElfinderBundle\\": "src/" }
},
"autoload-dev": {
"psr-4": { "FM\\ElfinderBundle\\Tests\\": "tests/" }
},
"extra": {
"branch-alias": {
"dev-main": "13.x-dev"
}
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
}
}
================================================
FILE: config/command.yaml
================================================
services:
fm_elfinder.command.installer:
class: FM\ElfinderBundle\Command\ElFinderInstallerCommand
arguments:
- '@Symfony\Component\Filesystem\Filesystem'
- '@Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface'
tags:
- { name: 'console.command', command: 'elfinder:install' }
================================================
FILE: config/elfinder.yaml
================================================
parameters:
fm_elfinder.loader: FM\ElfinderBundle\Loader\ElFinderLoader
fm_elfinder.configurator: FM\ElfinderBundle\Configuration\ElFinderConfigurationReader
services:
fm_elfinder.configurator.default:
class: '%fm_elfinder.configurator%'
arguments:
- '%fm_elfinder%'
- '@request_stack'
- '@service_container'
fm_elfinder.loader.default:
class: '%fm_elfinder.loader%'
autowire: true
arguments:
- '@fm_elfinder.configurator'
FM\ElfinderBundle\Loader\ElFinderLoader:
alias: fm_elfinder.loader.default
twig.extension.fm_elfinder_init:
class: FM\ElfinderBundle\Twig\Extension\FMElfinderExtension
arguments:
- '@twig'
tags:
- { name: 'twig.extension', alias: 'fm_elfinder_init' }
FM\ElfinderBundle\Controller\ElFinderController:
tags:
- { name: 'controller.service_arguments' }
arguments:
- '@twig'
- ~
- '@fm_elfinder.loader'
================================================
FILE: config/form.yaml
================================================
parameters:
elfinder.form.type.class: FM\ElfinderBundle\Form\Type\ElFinderType
services:
fm_elfinder.form.type:
class: '%elfinder.form.type.class%'
tags:
- { name: 'form.type' }
================================================
FILE: docs/advanced-configuration.md
================================================
# Advanced configuration
## Custom configuration provider
ElFinder bundle allows to override his configuration provider service:
```yaml
fm_elfinder:
configuration_provider: elfinder.configurator
```
where 'elfinder.configurator' is default ElFinder's bundle service to read configuration from DIC
To override service, simply define your own service:
```yaml
services:
my_elfinder_configurator:
class: Acme\DemoBundle\MyElfinderConfigurator
arguments: ["%my_arguments%"]
```
Configuration class must implement ElFinderConfigurationProviderInterface
method getConfiguration($instance) should return array of parameters compatible with ElFinder bundle configuration
## Custom loader
It is possible to override loader service with your own class:
```yaml
services:
my_loader:
class: AppBundle\Service\MyElFinderLoader
arguments: [@fm_elfinder.configurator]
fm_elfinder:
loader: my_loader
```
## Custom archivers
Elfinder has the ability to make/extract diffrent type of archives. Using the following configuration you can add/remove/override archive types based on mime type.
```yaml
fm_elfinder:
instances:
themes:
locale: %locale% # defaults to current request locale
cors_support: true
editor: simple
connector:
debug: true # defaults to false
roots: # at least one root must be defined
uploads:
driver: LocalFileSystem
path: %theme_root%
upload_allow: ['all']
upload_max_size: 10M
archive_mimes: "application/zip"
archivers:
create:
application/zip:
cmd: "phpfunction"
argc: "self::zipArchiveZip"
ext: "zip"
extract:
application/myzip:
cmd: "phpfunction"
argc: "self::zipArchiveUnzip"
ext: "zip"
```
## Plugins
ElFinder comes with some plugins, like auto-resize, which can be enabled, by the following configuration:
```yaml
fm_elfinder:
instances:
tinymce:
locale: %locale%
editor: tinymce4
relative_path: true
fullscreen: true
connector:
debug: true # defaults to false
binds:
upload.presave:
- Plugin.AutoResize.onUpLoadPreSave
plugins:
AutoResize: # global resize options, applies to root which don't have his own resize configuraion
enable: true
maxWidth: 750
maxHeight: 750
quality: 95 # JPEG image save quality
roots: # at least one root must be defined
uploads:
driver: LocalFileSystem
path: uploads
plugins:
AutoResize:
enable: true
maxWidth: 500
maxHeight: 500
quality: 95 # JPEG image save quality
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M
resize1:
driver: LocalFileSystem
path: uploads
plugins:
AutoResize:
enable: true # For control by volume driver
maxWidth: 800 # Path to Water mark image
maxHeight: 800 # Margin right pixel
quality: 95 # JPEG image save quality
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M
resize2:
driver: LocalFileSystem
path: uploads
plugins:
AutoResize:
enable: true
maxWidth: 800
maxHeight: 800
quality: 95
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M
```
ElFinder comes with other plugins, check Plugins folder under ElFinderPHP for more information.
## Symfony service as a volume driver
volumeDriver can be declared as Symfony service
The service should however be an instance of the FM\ElFinderPHP\Driver\ElFinderVolumeDriver class. This check is to
ensure the service is a valid ElFinder VolumeDriver.
To configure a root with a service-driver you can simply use the service id as the drive key:
```
fm_elfinder:
connector:
roots:
uploads:
driver: elfinder.driver.filesystem
path: uploads
```
This means that if you add the service definition:
```xml
<service id="elfinder.driver.filesystem" class="FM\ElFinderPHP\Driver\ElFinderVolumeLocalFileSystem" />
```
## Flysystem configuration
Since 4.0 bundle supports [flysystem](https://github.com/thephpleague/flysystem) filesystem abstraction library
Example configuration can be found here [Flysystem](/docs/flysystem.md)
================================================
FILE: docs/ckeditor-integration.md
================================================
# CKEditor integration
Mostly filebrowsers used with WYSIWYG editors to upload images and other files. There are two bundles to work with CKEditor
available: [TrsteelCKEditorBundle](https://github.com/trsteel88/TrsteelCkeditorBundle) and [FOSCKEditorBundle](https://github.com/FriendsOfSymfony/FOSCKEditorBundle)
Both will work with this bundle.
## Step 1: Installation
Install both bundles according README files
## Step 2: Configure CKEditor setting via settings.yml or through form builder:
```yaml
trsteel_ckeditor:
...
filebrowser_image_browse_url:
route: elfinder
route_parameters:
instance: ckeditor
```
or if you prefer FOSCKEditorBundle
```yaml
fos_ck_editor:
default_config: default
configs:
default:
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []
```
Note that instance name should be the same as configured in elfinder bundle
```php
// applies to Ivory CKEditor Bundle
$form = $this->createFormBuilder()
->add('content', 'ckeditor', array(
'config' => array(
'filebrowserBrowseRoute' => 'elfinder',
'filebrowserBrowseRouteParameters' => array(
'instance' => 'default',
'homeFolder' => ''
)
),
),
))
->getForm()
;
```
ElFinder will be available under Insert Image dialog
================================================
FILE: docs/configuration-dump.md
================================================
# Bundle configuration dump
```
# Default configuration for extension with alias: "fm_elfinder"
fm_elfinder:
configuration_provider: fm_elfinder.configurator.default
assets_path: assets
loader: fm_elfinder.loader.default
instances: # Required
# Prototype
name:
locale: null
cors_support: false
editor: simple
editor_template: null
fullscreen: true
theme: smoothness
include_assets: true
tinymce_popup_path: ''
relative_path: true
path_prefix: /
visible_mime_types: []
connector:
debug: false
binds:
# Prototype
name:
# Prototype
name: ~
plugins:
# Prototype
name:
# Prototype
name: ~
roots: # Required
# Prototype
name:
driver: LocalFileSystem # Required
volume_id: 0
path: ''
autoload: false
phash: ''
trash_hash: ''
locale: ''
i18n_folder_name: false
mime_detect: auto
mimefile: ''
security_voter: ''
start_path: ''
encoding: UTF-8
url: ''
alias: ''
img_lib: auto
tmb_path: .tmb
tmb_path_mode: 511
tmb_url: ''
tmb_size: 48
tmb_crop: true
tmb_bg_color: '#ffffff'
copy_overwrite: true
copy_join: true
copy_from: true
copy_to: true
upload_overwrite: true
fileMode: 420
upload_allow:
# Default:
- image
upload_deny:
# Default:
- all
upload_order:
# Defaults:
- deny
- allow
upload_max_size: 0
defaults:
# Prototype
defaults: ~
attributes:
# Prototype
-
pattern: ~
read: true
write: true
locked: false
hidden: false
accepted_name: '/^\w[\w\s\.\%\-]*$/u'
show_hidden: false
disabled_commands: []
tree_deep: 0
check_subfolders: 1
separator: /
date_format: 'j M Y H:i'
time_format: 'H:i'
archive_mimes: []
archivers:
enabled: false
create:
# Prototype
-
cmd: ~
argc: ~
ext: ~
extract:
# Prototype
-
cmd: ~
argc: ~
ext: ~
flysystem:
enabled: false
filesystem: ''
type: ''
adapter_service: ''
options:
local:
enabled: false
path: ''
ftp:
enabled: false
host: ''
username: ''
password: ''
port: 21
passive: true
ssl: true
timeout: 30
root: /
directoryPerm: 484
sftp:
enabled: false
host: ''
username: ''
password: ''
port: 21
privateKey: ''
timeout: 10
root: /
azure:
enabled: false
account_name: ''
account_key: ''
container_name: ''
aws_s3_v2:
enabled: false
key: ''
secret: ''
region: ''
bucket_name: ''
optional_prefix: ''
base_url: ''
aws_s3_v3:
enabled: false
key: ''
secret: ''
region: ''
version: ''
bucket_name: ''
optional_prefix: ''
endpoint: ''
use_path_style_endpoint: false
use_aws_shared_config_files: true
options:
enabled: false
ACL: ''
copy_com:
enabled: false
consumer_key: ''
consumer_secret: ''
access_token: ''
token_secret: ''
optional_prefix: ''
gridfs:
enabled: false
db_name: ''
zip:
enabled: false
path: ''
dropbox:
enabled: false
app: ''
token: ''
rackspace:
enabled: false
username: ''
apikey: ''
endpoint: ''
container: ''
region: ''
glide_url: ''
glide_key: ''
plugins:
# Prototype
name:
# Prototype
name: ~
driver_options:
# Prototype
name:
# Prototype
name: ~
dropbox2_settings:
enabled: false
app_key: ~
app_secret: ~
access_token: ~
aliasFormat: '%s@Dropbox'
path: /
separator: /
acceptedName: '%s@Dropbox'
rootCssClass: elfinder-navbar-root-dropbox
publishPermission:
requested_visibility: public
getThumbSize: medium
box_settings:
enabled: false
client_id: ~
client_secret: ~
accessToken: ~
root: Box.com
path: /
separator: /
tmbPath: ''
tmbURL: ''
tmpPath: ''
acceptedName: '#^[^/\?*:|"<>]*[^./\?*:|"<>]$#'
rootCssClass: elfinder-navbar-root-box
onedrive_settings:
enabled: false
client_id: ~
client_secret: ~
accessToken: ~
root: OneDrive.com
OneDriveApiClient: ''
path: /
separator: /
tmbPath: ''
tmbURL: ''
tmpPath: ''
acceptedName: '#^[^/\?*:|"<>]*[^./\?*:|"<>]$#'
rootCssClass: elfinder-navbar-root-onedrive
useApiThumbnail: true
ftp_settings:
enabled: false
host: ~
user: ~
password: ~
path: ~
s3_settings:
enabled: false
access_key: ~
secret_key: ~
bucket: ~
tmp_path: ~
signature: ~
region: ~
mysql_settings:
enabled: false
host: ~
user: ~
pass: ~
db: ~
port: null
socket: null
files_table: elfinder_file
tmbPath: ''
tmpPath: ''
rootCssClass: elfinder-navbar-root-sql
noSessionCache: hasdirs
```
================================================
FILE: docs/cors-support.md
================================================
# CORS support
If you want access connector URL from an other domain on the client side,
simply configure FMElFinder bundle as you used to, and add the `cors_support: true` option to the cross domain instance:
```yaml
# app/config/config.yml
fm_elfinder:
instances:
default:
locale: %locale% # defaults to current request locale
cors_support: true # allows cross domain responses handling (default false)
editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple,
# ...
```
Then you have to add the CORS headers (`Access-Control-Allow-Origin`) to the response.
It can be easily done with [NelmioCORSBundle](https://github.com/nelmio/NelmioCorsBundle "NelmioCORSBundle") :
```yaml
# app/config/config.yml
nelmio_cors:
defaults:
allow_credentials: false
allow_origin: []
allow_headers: []
allow_methods: []
expose_headers: []
max_age: 0
hosts: []
paths:
'^/efconnect':
allow_origin: ['*']
allow_headers: ['X-Custom-Auth', 'Content-Type', 'X-Requested-With']
allow_methods: ['POST', 'GET', 'PATCH', 'PUT', 'DELETE']
max_age: 3600
allow_credentials: true
```
================================================
FILE: docs/elfinder-form-type.md
================================================
# Elfinder Form Type
## Configuration
Bundle come with custom form type, `<input type="text"/>`, that provide elfinder callback (opens Elfinder window).
First, define instance with editor set to "form":
```yaml
fm_elfinder:
instances:
form:
locale: '%locale%' # defaults to current request locale
editor: form # other choices are tinymce or simple, and form
show_hidden: false # defaults to false
fullscreen: true # defaults true, applies to simple and ckeditor editors
connector:
debug: false # defaults to false
roots: # at least one root must be defined
uploads:
driver: LocalFileSystem
path: uploads
upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
upload_deny: ['all']
upload_max_size: 2M
```
On the second step, add to your form builder (or form class), elfinder type, and pass instance and `enable` parameters:
```php
// ...
use FM\ElfinderBundle\Form\Type\ElFinderType;
// ...
$form = $this->createFormBuilder()
->add('elfinder', ElFinderType::class, ['instance' => 'form', 'enable' => true])
->getForm();
```
```jinja
<form action="" method="post" {{ form_enctype(form) }}>
{{ form_widget(form) }}
<input type="submit" />
</form>
```
## EasyAdmin 2.x integration
To get to work with EasyAdmin bundle (2.x):
```yaml
- { property: 'images', type: 'collection', label: 'Images', type_options: { allow_add: false, allow_delete: false, entry_type: 'FM\ElfinderBundle\Form\Type\ElFinderType' }}
```
and `easyadmin.yaml`
```yaml
design:
form_theme:
- '@EasyAdmin/form/bootstrap_4.html.twig'
- '@FMElfinder/Form/elfinder_widget.html.twig'
```
## EasyAdmin 3.x/4.x integration
Almost same as for 2.x, but you need to add
```php
// ProjectCrudController.php
// ...
public function configureFields(string $pageName): iterable
{
// ...
yield Field::new('image', 'Image')
->setFormType(ElFinderType::class)
->setFormTypeOptions([
'instance' => 'default',
'enable' => true,
])
->onlyOnForms()
;
// ...
}
public function configureCrud(Crud $crud): Crud
{
return $crud
// ...
->addFormTheme('@FMElfinder/Form/elfinder_widget.html.twig')
;
}
```
Collection field:
```php
return [
Field::new('cover', 'Cover')->setFormType(ElFinderType::class)
->setFormTypeOptions(
[
'instance' => 'image_form',
'attr' => ['class' => 'col-6'],
]
)
->hideOnIndex(),
CollectionField::new('photos', 'Photos')
->setEntryType(PhotoType::class)
];
```
```php
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('path', ElFinderType::class, [
'instance' => 'image_form',
'enable' => true
])
->add('translations', TranslationsType::class, [
'fields' => [
'description' => [
'field_type' => CKEditorType::class,
'label' => 'Description',
],
],
]);
}
```
And override elfidner_widget.html.twig
```js
live('click', '[data-type="elfinder-input-field"]', function (event) {
var id = $(this).attr('id');
var childWin = window.open("{{path('elfinder', {'instance': instance, 'homeFolder': homeFolder })}}?id="+id, "popupWindow", "height=450, width=900");
});
```
================================================
FILE: docs/events-listeners-subscribers.md
================================================
# Events listeners / subscribers
## Events
The bundle is throwing some events during an elFinder command execution :
- `FM\ElfinderBundle\Event\ElFinderEvents::PRE_EXECUTION` : `fm_elfinder.event.pre_execution`
- `FM\ElfinderBundle\Event\ElFinderEvents::POST_EXECUTION` : `fm_elfinder.event.post_execution`
The pre execution event has its own class (`FM\ElfinderBundle\Event\ElFinderPreExecutionEvent`) which contains
the http request object, the elFinder instance name and the home folder.
The post execution event (`FM\ElfinderBundle\Event\ElFinderPostExecutionEvent`) has the same attributes
than the pre execution events, plus the command result and a `hasErrors()` function indicating if
errors has been encountered during command execution.
The result to return to the elFinder.js client can be modified with the post execution event
using the `setResult` function on this event.
You can register event listeners with the `fm_elfinder.event_listener` tag
and event subscribers with the `fm_elfinder.event_subscriber` tag.
**Note:** you must set the [`cors_support`](https://github.com/helios-ag/FMElfinderBundle/blob/master/docs/cors-support.md "CORS Support documentation") option to `true` to use events.
If you don't, the symfony life cycle won't end properly and the post execution event won't be dispatched.
Only use the NelmioCORSBundle if your elFinder client is on an other domain.
You can access to all commands names [here](https://github.com/helios-ag/ElFinderPHP/blob/master/src/ElFinder.php#L61 "elFinder commands").
## Sub requests
Events allows you to perform sub requests (only for commands used with HTTP GET method, i.e. not to upload a file).
These subrequests are working the same way than `forward` function on symfony controllers,
and are also hookable.
**Note:** You will have to set a `volume_id` to your instance's root to be sure the volume
is mounted with the same ID between each requests.
Here is an exemple of event listener on the post execution event, making a sub request :
```xml
<!-- src/AppBundle/Resources/config/services.xml -->
<service id="app_bundle.listener.elfinder_post_execution" class="AppBundle\EventListener\ElFinder\PostExecutionListener">
<tag name="fm_elfinder.event_listener" event="fm_elfinder.event.post_execution" method="onPostExecute" />
</service>
```
```php
// src/AppBundle/EventListener/ElFinder/PostExecutionListener.php
namespace AppBundle\EventListener\ElFinder;
use FM\ElfinderBundle\Event\ElFinderPostExecutionEvent;
class PostExecutionListener
{
/**
* @param ElFinderPostExecutionEvent $event
*/
public function onPostExecute(ElFinderPostExecutionEvent $event)
{
if (!$event->hasErrors() && $event->getCommand() == 'tmb') { // 'tmb', 'mkdir', 'open', etc...
// do your stuff here
// ...
// you can perform a sub request
$queryParameters = $event->getRequest()->query->all(); // getting original request parameters
$queryParameters['cmd'] = 'info'; // changing the command to execute in sub request
$jsonResponse = $event->subRequest(array(
'instance' => $event->getInstance(), // you can also make a subrequest on an other instance
'homeFolder' => $event->getHomeFolder() // and an other homeFolder
), $queryParameters);
$data = json_decode($jsonResponse->getContent());
// work with sub request data
// ...
}
}
}
```
================================================
FILE: docs/flysystem.md
================================================
Flysystem example configuration
===============================
You will need library files to work with Flysystem:
First add flysystem elfinder driver:
```sh
composer require barryvdh/elfinder-flysystem-driver
```
Depending which driver you want to use, you need require appropriate driver, for example:
```sh
composer require league/flysystem-aws-s3-v3
```
Below example of configuring flysystem:
```yaml
fm_elfinder:
instances:
default:
locale: %locale% # defaults to current request locale
editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple
fullscreen: true # defaults true, applies to simple and ckeditor editors
connector:
debug: false # defaults to false
roots: # at least one root must be defined
local:
driver: Flysystem
path: uploads
flysystem:
type: local
options:
local:
path: %kernel.root_dir%/../web/uploads/
upload_allow: ['all']
#upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
#upload_deny: ['all']
upload_max_size: 2M
dropbox:
driver: Flysystem
path: uploads
flysystem:
type: dropbox
options:
dropbox:
app: YourAppname // see dropbox developer site
token: ToKeN // can be aquired via developer console
upload_allow: ['all']
aws_s3:
driver: Flysystem
path: uploads
url: 'http://[my-bucket-name].s3.[region].amazonaws.com'
tmb_url: 'self' # For thumbnail generation on aws
flysystem:
type: aws_s3_v3
options:
aws_s3_v3:
version: 'latest'
key: 'MY_AWS_KEY'
secret: 'MY_AWS_SECRET'
region: 'MY_AWS_REGION'
bucket_name: 'MY_BUCKET_NAME'
upload_allow: ['all']
```
for more options see [ElFinderConfigurationReader.php](https://github.com/helios-ag/FMElfinderBundle/blob/master/Configuration/ElFinderConfigurationReader.php)
# Amazon S3 Configuration
To work with your S3 account and upload your files directly to S3 you have to set the following properties in your config file (config.yml).
```yaml
fm_elfinder:
instances:
default:
locale: %locale%
editor: ckeditor
fullscreen: true
relative_path: false
connector:
debug: false
roots:
aws_s3:
driver: Flysystem
path: uploads
url: 'http://[my-bucket-name].s3.[region].amazonaws.com'
tmb_url: 'self' # For thumbnail generation on aws
flysystem:
type: aws_s3_v3
options:
aws_s3_v3:
version: 'latest'
key: 'MY_AWS_KEY'
secret: 'MY_AWS_SECRET'
region: 'MY_AWS_REGION'
bucket_name: 'MY_BUCKET_NAME'
upload_allow: ['all']
```
In that case you use an S3 domain so the **relative_path** have to be false and the url have to be set to your S3 or Cloudfront Domain if you have mapped S3 directly to your filesystem work with the relative path.
If you don't set the **relative_path** to false you get a wrong URL after inserting that image to CKEditor for example.
Define the variables in your config.yml or set it directly.
If you don't use subdomain that contains your `bucket_name` and want to use your own **endpoint** make sure to set **use_path_style_endpoint** to `true` so that it will format the url correctly.
To prevent AWS PHP SDK from verifying the presence of a shared configuration in .aws/configuration make sure to set **use_aws_shared_config_files** to `false`.
Also possible to define Flysystem adapters as services, it can be useful for self written adapters.
To use adapter as service, define it under 'services' node in your services.yml (or use DI)
```services.yml
services:
local_adapter:
class: League\Flysystem\Adapter\Local
arguments: ["%kernel.root_dir%/../web/uploads/"]
```
and configure flysystem node accordingly to use it
```config.yml
fm_elfinder:
instances:
adapter:
locale: %locale%
editor: simple
relative_path: true
connector:
roots:
uploads:
show_hidden: false
driver: Flysystem # !set driver to Flysystem
flysystem:
type: custom # !set type to custom, it will tell bundle to use custom driver
adapter_service: 'local_adapter' # select previously configured adapter service
options:
path: ''
upload_allow: ['all']
```
================================================
FILE: docs/summernote-integration.md
================================================
# Summernote integration
Update the editor property in your app/config.yml
Set Summernote editor type:
```yaml
fm_elfinder:
editor: summernote
```
Edit template that contains summernote instance (the same way as for tinymce)
```jinja
{{ elfinder_summernote_init('instance_name') }}
{{ summernote_init() }}
```
Don't forget to enable elfinder plugin in summernote configuration.
================================================
FILE: docs/tinymce-integration.md
================================================
# TinyMCE integration
You can integrate TinyMCE byself or use Bundles that already add TinyMCE functionality to your Symfony project.
Below instruction how to integrate [FMElfinderBundle](https://github.com/helios-ag/FMElfinderBundle) with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle)
How to use ElfinderBundle with [TinyMCEBundle](https://github.com/stfalcon/TinymceBundle)
## TinyMCE 3.x
Instruction for version 0.2.1 (TinyMCE 3.x)
Download bundles, configure, dump and install assets as written in installation steps
**Configuration**
Update the editor property in your app/config.yml
Set TinyMce popup path:
```yaml
fm_elfinder:
editor: tinymce
tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]"
```
Under tinymce configuration node, theme configuration, add:
file_browser_callback : 'elFinderBrowser'
```yaml
stfalcon_tinymce:
theme:
simple:
file_browser_callback : 'elFinderBrowser'
```
after ( {{ tinymce_init() }} ) function call
place ElfinderBundle's function:
```jinja
{{ elfinder_tinymce_init('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'}) }}
```
as shown below
```jinja
{{ tinymce_init() }}
{{ elfinder_tinymce_init('instance_name') }}
```
instance_name is an instance of elfinder's configuration
## TinyMCE 4.x
Update the editor property in your app/config.yml
```yaml
fm_elfinder:
editor: tinymce4
```
Under tinymce configuration node, theme configuration, add:
file_browser_callback : elFinderBrowser
```yaml
stfalcon_tinymce:
theme:
simple:
file_browser_callback : elFinderBrowser
```
before ( {{ tinymce_init() }} ) function call (order is important)
place ElfinderBundle's function:
{{ elfinder_tinymce_init4('instance_name', {'width':'900', 'height': '450', 'title':'ElFinder 2.0'} ) }}
as shown below
```jinja
{{ elfinder_tinymce_init4('instance_name') }}
{{ tinymce_init() }}
```
instance_name is instance of elfinder configuration
================================================
FILE: phpunit.xml.dist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/autoload.php"
colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
>
<!-- <coverage>-->
<!-- <report>-->
<!-- <clover outputFile="./clover.xml"/>-->
<!-- </report>-->
<!-- </coverage>-->
<php>
<server name="KERNEL_DIR" value="./tests/Functional"/>
<ini name="error_reporting" value="-1"/>
<!-- ###+ symfony/framework-bundle ### -->
<env name="APP_ENV" value="dev"/>
<env name="APP_SECRET" value=""/>
<!-- ###- symfony/framework-bundle ### -->
</php>
<testsuites>
<testsuite name="FMElfinderBundle test suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<logging>
<!-- and this is where your report will be written -->
</logging>
<source>
<include>
<directory>./</directory>
</include>
<exclude>
<directory>./src/Controller</directory>
<directory>./src/Resources</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</source>
</phpunit>
================================================
FILE: src/Bridge/ElFinderBridge.php
================================================
<?php
namespace FM\ElfinderBundle\Bridge;
use elFinderVolumeDriver;
use FM\ElfinderBundle\ElFinder\ElFinder;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class ElFinderBridge extends ElFinder
{
/** @var SessionInterface */
protected $session;
public function __construct($opts)
{
if ($this->session) {
$opts = array_merge($opts, ['session' => $this->session]);
}
parent::__construct($opts);
}
public function setSession($session)
{
$this->session = $session;
}
public function getVolumes(): array
{
return $this->volumes;
}
/**
* @param array $opts
*/
protected function mountVolumes($opts)
{
foreach ($opts['roots'] as $i => $o) {
$volume = null;
if (isset($o['service'])) {
$driver = $o['service'];
if ($driver instanceof elFinderVolumeDriver) {
$volume = $driver;
unset($opts['roots'][$i]);
}
}
if ($volume && $volume->mount($o)) {
// unique volume id (ends on "_") - used as prefix to files hash
$id = $volume->id();
$this->volumes[$id] = $volume;
if (!$this->default && $volume->isReadable()) {
$this->default = $this->volumes[$id];
}
}
}
parent::mountVolumes($opts);
}
}
================================================
FILE: src/Command/ElFinderInstallerCommand.php
================================================
<?php
namespace FM\ElfinderBundle\Command;
use ReflectionClass;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Filesystem\Filesystem;
#[AsCommand(
name: 'elfinder:install',
description: 'Copies elfinder assets to public directory',
)]
final class ElFinderInstallerCommand extends Command
{
private const ELFINDER_CSS_DIR = 'css';
private const ELFINDER_JS_DIR = 'js';
private const ELFINDER_SOUNDS_DIR = 'sounds';
private const ELFINDER_IMG_DIR = 'img';
public function __construct(
protected Filesystem $fileSystem,
protected ParameterBagInterface $parameterBag
) {
parent::__construct();
}
protected function configure(): void
{
$this
->addOption('docroot', null, InputOption::VALUE_OPTIONAL, 'Website document root.', 'public')
->addOption('elfinder-vendor-dir', null, InputOption::VALUE_REQUIRED, 'Vendor containing elfinder assets', 'studio-42/elfinder')
->setHelp(<<<'EOF'
Default docroot:
<info>public</info>
You can pass docroot:
<info>Where to install elfinder</info>
<info>php %command.full_name% --docroot=public_html</info>
EOF
);
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$dr = $input->getOption('docroot');
$vendorDir = $input->getOption('elfinder-vendor-dir');
$io->title('elFinder Installer');
$io->comment(sprintf('Trying to install elfinder to %s directory', $dr));
$rootDir = $this->parameterBag->get('kernel.project_dir');
$publicDir = sprintf('%s/%s/bundles/fmelfinder', $rootDir, $dr);
$reflection = new ReflectionClass(\Composer\Autoload\ClassLoader::class);
$vendorRootDir = dirname($reflection->getFileName(), 3) . '/vendor';
$io->note(sprintf('Starting to install elfinder to %s folder', $publicDir));
// validate $vendorDir to match namespace/vendor name
if (!preg_match('/^([a-z0-9-]+)\/([a-z0-9-]+)$/i', $vendorDir)) {
$io->error(sprintf('Invalid vendor directory name %s', $vendorDir));
return Command::FAILURE;
}
$this->fileSystem->mirror($vendorRootDir . '/' . $vendorDir . '/' . self::ELFINDER_CSS_DIR, $publicDir . '/css');
$this->fileSystem->mirror($vendorRootDir . '/' . $vendorDir . '/' . self::ELFINDER_IMG_DIR, $publicDir . '/img');
$this->fileSystem->mirror($vendorRootDir . '/' . $vendorDir . '/' . self::ELFINDER_JS_DIR, $publicDir . '/js');
$this->fileSystem->mirror($vendorRootDir . '/' . $vendorDir . '/' . self::ELFINDER_SOUNDS_DIR, $publicDir . '/sounds');
$io->success('elFinder assets successfully installed');
return Command::SUCCESS;
}
}
================================================
FILE: src/Configuration/ElFinderConfigurationProviderInterface.php
================================================
<?php
namespace FM\ElfinderBundle\Configuration;
interface ElFinderConfigurationProviderInterface
{
public function getConfiguration(string $instance): array;
}
================================================
FILE: src/Configuration/ElFinderConfigurationReader.php
================================================
<?php
namespace FM\ElfinderBundle\Configuration;
use Aws\S3\S3Client;
use Barracuda\Copy\API;
use Exception;
use FM\ElfinderBundle\Security\ElfinderSecurityInterface;
use League\Flysystem\Adapter\Ftp;
use League\Flysystem\Adapter\Local;
use League\Flysystem\AdapterInterface;
use League\Flysystem\AwsS3v2\AwsS3Adapter as AwsS3v2;
use League\Flysystem\AwsS3V3\AwsS3V3Adapter as AwsS3v3;
use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter;
use League\Flysystem\Copy\CopyAdapter;
use League\Flysystem\Filesystem;
use League\Flysystem\GridFS\GridFSAdapter;
use League\Flysystem\Rackspace\RackspaceAdapter;
use League\Flysystem\Sftp\SftpAdapter;
use League\Flysystem\ZipArchive\ZipArchiveAdapter;
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
use MongoClient;
use OpenCloud\Rackspace;
use Spatie\Dropbox\Client;
use Spatie\FlysystemDropbox\DropboxAdapter;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use TypeError;
class ElFinderConfigurationReader implements ElFinderConfigurationProviderInterface
{
protected array $options = [];
protected array $parameters;
protected RequestStack $requestStack;
protected ContainerInterface $container;
public function __construct(array $parameters, RequestStack $requestStack, ContainerInterface $container)
{
$this->parameters = $parameters;
$this->requestStack = $requestStack;
$this->container = $container;
}
public function getConfiguration(string $instance): array
{
$request = $this->requestStack->getCurrentRequest();
$efParameters = $this->parameters;
$parameters = $efParameters['instances'][$instance];
$options = [];
$options['corsSupport'] = $parameters['cors_support'];
$options['debug'] = $parameters['connector']['debug'];
$options['bind'] = $parameters['connector']['binds'];
$options['plugin'] = $parameters['connector']['plugins'];
$options['roots'] = [];
foreach ($parameters['connector']['roots'] as $parameter) {
$path = $parameter['path'];
$homeFolder = $request->attributes->get('homeFolder');
$pathAndHomeFolder = $homeFolder ? sprintf('%s/%s', $path, $homeFolder) : $path;
if ($parameter['flysystem']['enabled']) {
if ($parameter['flysystem']['filesystem']) {
$serviceName = $parameter['flysystem']['filesystem'];
$filesystem = $this->getFlysystemFilesystem($serviceName);
} else {
$adapter = $parameter['flysystem']['type']; // ftp ex.
$serviceName = $parameter['flysystem']['adapter_service'];
$opt = $parameter['flysystem']['options'];
$filesystem = $this->configureFlysystem($opt, $adapter, $serviceName);
}
}
$driver = $this->container->has($parameter['driver']) ? $this->container->get($parameter['driver']) : false;
$driverOptions = [
'driver' => $parameter['driver'],
'service' => $driver,
'glideURL' => $parameter['glide_url'],
'glideKey' => $parameter['glide_key'],
'plugin' => $options['plugin'],
'path' => $pathAndHomeFolder,
'startPath' => $parameter['start_path'],
'encoding' => $parameter['encoding'],
'URL' => $this->getURL($parameter, $request, $homeFolder, $path),
'alias' => $parameter['alias'],
'mimeDetect' => $parameter['mime_detect'],
'mimefile' => $parameter['mimefile'],
'imgLib' => $parameter['img_lib'],
'tmbPath' => $parameter['tmb_path'],
'tmbPathMode' => $parameter['tmb_path_mode'],
'tmbURL' => $parameter['tmb_url'],
'tmbSize' => $parameter['tmb_size'],
'tmbCrop' => $parameter['tmb_crop'],
'tmbBgColor' => $parameter['tmb_bg_color'],
'copyOverwrite' => $parameter['copy_overwrite'],
'copyJoin' => $parameter['copy_join'],
'copyFrom' => $parameter['copy_from'],
'copyTo' => $parameter['copy_to'],
'uploadOverwrite' => $parameter['upload_overwrite'],
'uploadAllow' => $parameter['upload_allow'],
'uploadDeny' => $parameter['upload_deny'],
'uploadMaxSize' => $parameter['upload_max_size'],
'uploadMaxConn' => $parameter['upload_max_conn'],
'defaults' => $parameter['defaults'],
'attributes' => $parameter['attributes'],
'acceptedName' => $parameter['accepted_name'],
'disabled' => $parameter['disabled_commands'],
'treeDeep' => $parameter['tree_deep'],
'checkSubfolders' => $parameter['check_subfolders'],
'separator' => $parameter['separator'],
'timeFormat' => $parameter['time_format'],
'archiveMimes' => $parameter['archive_mimes'],
'archivers' => $parameter['archivers'],
'fileMode' => $parameter['fileMode'],
'trashHash' => $parameter['trash_hash'],
];
if (null !== $parameter['quarantine']) {
$driverOptions['quarantine'] = $parameter['quarantine'];
}
if ($parameter['volume_id'] > 0) {
$driverOptions['id'] = $parameter['volume_id'];
}
if (!$parameter['show_hidden']) {
$driverOptions['accessControl'] = [$this, 'access'];
}
if ($parameter['security_voter']) {
/** @var ElfinderSecurityInterface $voter */
$voter = $this->container->get($parameter['security_voter']);
$driverOptions['disabled'] = $this->parseSecurityConfiguration($voter);
}
if ('Flysystem' == $parameter['driver']) {
$driverOptions['filesystem'] = $filesystem;
}
$options['roots'][] = array_merge($driverOptions, $this->configureDriver($parameter));
}
return $options;
}
/**
* Simple function to demonstrate how to control file access using "accessControl" callback.
* This method will disable accessing files/folders starting from '.' (dot).
*
* @param string $attr attribute name (read|write|locked|hidden)
* @param string $path file path relative to volume root directory started with directory separator
*
* @return bool|null
*/
public function access($attr, $path, $data, $volume)
{
return 0 === strpos(basename($path), '.') // if file/folder begins with '.' (dot)
? !('read' == $attr || 'write' == $attr) // set read+write to false, other (locked+hidden) set to true
: null; // else elFinder decide it itself
}
/**
* @return array
*/
protected function parseSecurityConfiguration(ElfinderSecurityInterface $voter)
{
$configuration = $voter->getConfiguration();
if (!is_array($configuration)) {
throw new Exception('ElfinderSecurityVoter should return array');
}
foreach ($configuration as $role => $commands) {
if ($this->container->get('security.authorization_checker')->isGranted($role)) {
return $commands;
}
}
return [];
}
private function getURL(array $parameter, Request $request, string $homeFolder, string $path): string
{
if (isset($parameter['url']) && $parameter['url']) {
if (0 === strpos($parameter['url'], 'http')) {
return str_replace('{homeFolder}', $homeFolder, $parameter['url']);
}
$path = $parameter['url'] . '/' . $homeFolder;
} else {
$path = $path . '/' . $homeFolder;
}
return $request->getUriForPath('/' . trim($path, '/'));
}
/**
* @return Filesystem
*/
private function configureFlysystem($opt, $adapter, $serviceName)
{
$filesystem = null;
switch ($adapter) {
case 'local':
$filesystem = new Filesystem(new Local($opt['local']['path']));
break;
case 'ftp':
$settings = [
'host' => $opt['ftp']['host'],
'username' => $opt['ftp']['username'],
'password' => $opt['ftp']['password'],
/* optional config settings */
'port' => $opt['ftp']['port'],
'root' => $opt['ftp']['root'],
'passive' => $opt['ftp']['passive'],
'ssl' => $opt['ftp']['ssl'],
'timeout' => $opt['ftp']['timeout'],
'directoryPerm' => $opt['ftp']['directoryPerm'],
];
$filesystem = new Filesystem(new Ftp($settings));
break;
case 'sftp':
$settings = [
'host' => $opt['sftp']['host'],
'port' => $opt['sftp']['port'],
'username' => $opt['sftp']['username'],
'password' => $opt['sftp']['password'],
'privateKey' => $opt['sftp']['privateKey'],
'root' => $opt['sftp']['root'],
'timeout' => $opt['sftp']['timeout'],
];
$filesystem = new Filesystem(new SftpAdapter($settings));
break;
case 'azure':
$client = BlobRestProxy::createBlobService(
sprintf('DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s;', $opt['azure']['account_name'], $opt['azure']['account_key'])
);
$adapter = new AzureBlobStorageAdapter($client, $opt['azure']['container_name']);
$filesystem = new Filesystem($adapter);
break;
case 'aws_s3_v2':
$options = [
'key' => $opt['aws_s3_v2']['key'],
'secret' => $opt['aws_s3_v2']['secret'],
'region' => $opt['aws_s3_v2']['region'],
];
if (isset($opt['aws_s3_v2']['base_url']) && $opt['aws_s3_v2']['base_url']) {
$options['base_url'] = $opt['aws_s3_v2']['base_url'];
}
$client = S3Client::factory($options);
$filesystem = new Filesystem(new AwsS3v2($client, $opt['aws_s3_v2']['bucket_name'], $opt['aws_s3_v2']['optional_prefix']));
break;
case 'aws_s3_v3':
$s3Options = [
'region' => $opt['aws_s3_v3']['region'],
'version' => $opt['aws_s3_v3']['version'],
'endpoint' => $opt['aws_s3_v3']['endpoint'],
'use_path_style_endpoint' => $opt['aws_s3_v3']['use_path_style_endpoint'],
'use_aws_shared_config_files' => $opt['aws_s3_v3']['use_aws_shared_config_files'],
];
if (!empty($opt['aws_s3_v3']['key']) && !empty($opt['aws_s3_v3']['secret'])) {
$s3Options['credentials'] = [
'key' => $opt['aws_s3_v3']['key'],
'secret' => $opt['aws_s3_v3']['secret'],
];
}
$client = new S3Client($s3Options);
$filesystem = new Filesystem(new AwsS3v3($client, $opt['aws_s3_v3']['bucket_name'], $opt['aws_s3_v3']['optional_prefix'], null, null, $opt['aws_s3_v3']['options'] ?? []));
break;
case 'copy_com':
$client = new API(
$opt['copy_com']['consumer_key'],
$opt['copy_com']['consumer_secret'],
$opt['copy_com']['access_token'],
$opt['copy_com']['token_secret']
);
$filesystem = new Filesystem(new CopyAdapter($client, $opt['copy_com']['optional_prefix']));
break;
case 'gridfs':
$mongoClient = new MongoClient();
$gridFs = $mongoClient->selectDB($opt['gridfs']['db_name'])->getGridFS();
$filesystem = new Filesystem(new GridFSAdapter($gridFs));
break;
case 'zip':
$filesystem = new Filesystem(new ZipArchiveAdapter($opt['zip']['path']));
break;
case 'dropbox':
$filesystem = new Filesystem(new DropboxAdapter(new Client($opt['dropbox']['token'])));
break;
case 'rackspace':
$client = new Rackspace(Rackspace::$opt['rackspace']['endpoint'], [
'username' => $opt['rackspace']['username'],
'apiKey' => $opt['rackspace']['apikey'],
]);
$store = $client->objectStoreService('cloudFiles', $opt['rackspace']['region']);
$container = $store->getContainer($opt['rackspace']['container']);
$filesystem = new Filesystem(new RackspaceAdapter($container));
break;
case 'custom':
$adapter = $this->container->get($serviceName);
try {
$filesystem = new Filesystem($adapter);
} catch (TypeError $error) {
throw new Exception(sprintf('Service %s is not an instance of %s.', $serviceName, AdapterInterface::class));
}
break;
}
return $filesystem;
}
private function getFlysystemFilesystem(string $serviceName): Filesystem
{
$filesystem = $this->container->get($serviceName);
if (!is_object($filesystem) || (!$filesystem instanceof Filesystem)) {
throw new Exception(sprintf('Service %s is not an instance of %s.', $serviceName, Filesystem::class));
}
return $filesystem;
}
private function configureDriver(array $parameter): array
{
$settings = [];
switch (strtolower($parameter['driver'])) {
case 'ftp':
$settings['host'] = $parameter['ftp_settings']['host'];
$settings['user'] = $parameter['ftp_settings']['user'];
$settings['pass'] = $parameter['ftp_settings']['password'];
$settings['path'] = $parameter['ftp_settings']['path'];
break;
case 'mysql':
$settings['host'] = $parameter['mysql_settings']['host'];
$settings['user'] = $parameter['mysql_settings']['user'];
$settings['pass'] = $parameter['mysql_settings']['pass'];
$settings['db'] = $parameter['mysql_settings']['db'];
$settings['port'] = $parameter['mysql_settings']['port'];
$settings['socket'] = $parameter['mysql_settings']['socket'];
$settings['files_table'] = $parameter['mysql_settings']['files_table'];
$settings['tmbPath'] = $parameter['mysql_settings']['tmbPath'];
$settings['tmpPath'] = $parameter['mysql_settings']['tmpPath'];
$settings['rootCssClass'] = $parameter['mysql_settings']['rootCssClass'];
$settings['noSessionCache'] = explode(',', $parameter['mysql_settings']['noSessionCache']);
break;
case 'dropbox2':
$settings['app_key'] = $parameter['dropbox2_settings']['app_key'];
$settings['app_secret'] = $parameter['dropbox2_settings']['app_secret'];
$settings['access_token'] = $parameter['dropbox2_settings']['access_token'];
$settings['aliasFormat'] = $parameter['dropbox2_settings']['aliasFormat'];
$settings['path'] = $parameter['dropbox2_settings']['path'];
$settings['separator'] = $parameter['dropbox2_settings']['separator'];
$settings['acceptedName'] = $parameter['dropbox2_settings']['acceptedName'];
$settings['rootCssClass'] = $parameter['dropbox2_settings']['rootCssClass'];
$settings['publishPermission'] = $parameter['dropbox2_settings']['publishPermission'];
$settings['getThumbSize'] = $parameter['dropbox2_settings']['getThumbSize'];
break;
case 'onedrive':
$settings['client_id'] = $parameter['onedrive_settings']['client_id'];
$settings['client_secret'] = $parameter['onedrive_settings']['client_secret'];
$settings['accessToken'] = $parameter['onedrive_settings']['accessToken'];
$settings['root'] = $parameter['onedrive_settings']['root'];
$settings['OneDriveApiClient'] = $parameter['onedrive_settings']['OneDriveApiClient'];
$settings['path'] = $parameter['onedrive_settings']['path'];
$settings['separator'] = $parameter['onedrive_settings']['separator'];
$settings['tmbPath'] = $parameter['onedrive_settings']['tmbPath'];
$settings['tmbURL'] = $parameter['onedrive_settings']['tmbURL'];
$settings['tmpPath'] = $parameter['onedrive_settings']['tmpPath'];
$settings['acceptedName'] = $parameter['onedrive_settings']['acceptedName'];
$settings['rootCssClass'] = $parameter['onedrive_settings']['rootCssClass'];
$settings['useApiThumbnail'] = $parameter['onedrive_settings']['useApiThumbnail'];
break;
case 'box':
$settings['client_id'] = $parameter['box_settings']['client_id'];
$settings['client_secret'] = $parameter['box_settings']['client_secret'];
$settings['accessToken'] = $parameter['box_settings']['accessToken'];
$settings['root'] = $parameter['box_settings']['root'];
$settings['path'] = $parameter['box_settings']['path'];
$settings['separator'] = $parameter['box_settings']['separator'];
$settings['tmbPath'] = $parameter['box_settings']['tmbPath'];
$settings['tmbURL'] = $parameter['box_settings']['tmbURL'];
$settings['acceptedName'] = $parameter['box_settings']['acceptedName'];
$settings['rootCssClass'] = $parameter['box_settings']['rootCssClass'];
break;
default:
break;
}
return $settings;
}
}
================================================
FILE: src/Connector/ElFinderConnector.php
================================================
<?php
namespace FM\ElfinderBundle\Connector;
use elFinder;
class ElFinderConnector extends \elFinderConnector
{
public function run($queryParameters = null)
{
if (null === $queryParameters) {
$queryParameters = $_GET;
}
return $this->execute($queryParameters);
}
public function execute($queryParameters)
{
$isPost = 'POST' == $_SERVER['REQUEST_METHOD'];
$src = 'POST' == $_SERVER['REQUEST_METHOD'] ? array_merge($_POST, $queryParameters) : $queryParameters;
if ($isPost && !$src && $rawPostData = @file_get_contents('php://input')) {
// for support IE XDomainRequest()
$parts = explode('&', $rawPostData);
foreach ($parts as $part) {
[$key, $value] = array_pad(explode('=', $part), 2, '');
$src[$key] = rawurldecode($value);
}
$_POST = $src;
$_REQUEST = array_merge_recursive($src, $_REQUEST);
}
$cmd = $src['cmd'] ?? '';
$args = [];
if (!function_exists('json_encode')) {
$error = $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_JSON);
return $this->output(['error' => '{"error":["' . implode('","', $error) . '"]}', 'raw' => true]);
}
if (!$this->elFinder->loaded()) {
return $this->output(['error' => $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_VOL), 'debug' => $this->elFinder->mountErrors]);
}
// telepat_mode: on
if (!$cmd && $isPost) {
return $this->output(['error' => $this->elFinder->error(elFinder::ERROR_UPLOAD, elFinder::ERROR_UPLOAD_TOTAL_SIZE), 'header' => 'Content-Type: text/html']);
}
// telepat_mode: off
if (!$this->elFinder->commandExists($cmd)) {
return $this->output(['error' => $this->elFinder->error(elFinder::ERROR_UNKNOWN_CMD)]);
}
// collect required arguments to exec command
foreach ($this->elFinder->commandArgsList($cmd) as $name => $req) {
$arg = 'FILES' == $name
? $_FILES
: ($src[$name] ?? '');
if (!is_array($arg)) {
$arg = trim($arg);
}
if ($req && (!isset($arg) || '' === $arg)) {
return $this->output(['error' => $this->elFinder->error(elFinder::ERROR_INV_PARAMS, $cmd)]);
}
$args[$name] = $arg;
}
$args['debug'] = isset($src['debug']) && $src['debug'];
return $this->output($this->elFinder->exec($cmd, $this->input_filter($args)));
}
protected function output(array $data)
{
if (isset($data['pointer'])) {
parent::output($data);
}
return $data;
}
}
================================================
FILE: src/Controller/ElFinderController.php
================================================
<?php
namespace FM\ElfinderBundle\Controller;
use Exception;
use FM\ElfinderBundle\Event\ElFinderPostExecutionEvent;
use FM\ElfinderBundle\Event\ElFinderPreExecutionEvent;
use FM\ElfinderBundle\Loader\ElFinderLoader;
use FM\ElfinderBundle\Loader\ElFinderLoaderInterface;
use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Twig\Environment;
class ElFinderController
{
protected array $params;
private Environment $twig;
private ElFinderLoaderInterface $loader;
public function __construct(Environment $twig, array $params, ElFinderLoaderInterface $loader)
{
$this->twig = $twig;
$this->params = $params;
$this->loader = $loader;
}
/**
* Renders Elfinder.
*
* @throws Exception
*/
public function show(Request $request, string $instance, string $homeFolder): Response
{
$efParameters = $this->params;
if (empty($efParameters['instances'][$instance])) {
throw new NotFoundHttpException('Instance not found');
}
$parameters = $efParameters['instances'][$instance];
if (empty($parameters['locale'])) {
$parameters['locale'] = $request->getLocale();
}
$assetsPath = $efParameters['assets_path'];
$result = $this->selectEditor($parameters, $instance, $homeFolder, $assetsPath, $request->query->get('id'));
return new Response($this->twig->render($result['template'], $result['params']));
}
public function load(SessionInterface $session, HttpKernelInterface $httpKernel, EventDispatcherInterface $eventDispatcher, Request $request, string $instance, string $homeFolder): JsonResponse
{
$loader = $this->loader;
$efParameters = $this->params;
$loader->initBridge($instance, $efParameters); // builds up the Bridge object for the loader with the given instance
if ($loader instanceof ElFinderLoader) {
$loader->setSession($session);
}
$preExecutionEvent = new ElFinderPreExecutionEvent($request, $httpKernel, $instance, $homeFolder);
$eventDispatcher->dispatch($preExecutionEvent);
$result = $loader->load($request); // the instance is already set
$postExecutionEvent = new ElFinderPostExecutionEvent($request, $httpKernel, $instance, $homeFolder, $result);
$eventDispatcher->dispatch($postExecutionEvent);
// returning result (who may have been modified by a post execution event listener)
return new JsonResponse($postExecutionEvent->getResult());
}
public function mainJS(): Response
{
$version = new EmptyVersionStrategy();
$package = new Package($version);
$mainUrl = $package->getUrl(sprintf('%s/bundles/fmelfinder/js', $this->params['assets_path']));
return new Response(
$this->twig->render('@FMElfinder/Elfinder/helper/main.js.twig',['mainUrl' => $mainUrl]),
200,
[
'Content-type' => 'text/javascript',
]
);
}
/**
* @throws Exception
*/
private function selectEditor(array $parameters, string $instance, string $homeFolder, string $assetsPath, ?string $formTypeId = null): array
{
$editor = $parameters['editor'];
$locale = $parameters['locale'] ?: $this->container->getParameter('locale');
$fullScreen = $parameters['fullscreen'];
$relativePath = $parameters['relative_path'];
$pathPrefix = $parameters['path_prefix'];
$theme = $parameters['theme'];
// convert to javascript array
$onlyMimes = count($parameters['visible_mime_types'])
? "['" . implode("','", $parameters['visible_mime_types']) . "']"
: '[]';
$result = [];
switch ($editor) {
case 'custom':
if (empty($parameters['editor_template'])) {
throw new Exception("Configuration error : 'custom' editor must define 'editor_template' parameter");
}
$result['template'] = $parameters['editor_template'];
$result['params'] = [
'locale' => $locale,
'fullscreen' => $fullScreen,
'instance' => $instance,
'homeFolder' => $homeFolder,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
'id' => $formTypeId,
];
return $result;
case 'ckeditor':
$result['template'] = '@FMElfinder/Elfinder/ckeditor.html.twig';
$result['params'] = [
'locale' => $locale,
'fullscreen' => $fullScreen,
'instance' => $instance,
'homeFolder' => $homeFolder,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
case 'summernote':
$result['template'] = '@FMElfinder/Elfinder/summernote.html.twig';
$result['params'] = [
'locale' => $locale,
'fullscreen' => $fullScreen,
'instance' => $instance,
'homeFolder' => $homeFolder,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
case 'tinymce':
$result['template'] = '@FMElfinderBundle/Elfinder/tinymce.html.twig';
$result['params'] = [
'locale' => $locale,
'tinymce_popup_path' => $parameters['tinymce_popup_path'],
'instance' => $instance,
'homeFolder' => $homeFolder,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
case 'tinymce4':
$result['template'] = '@FMElfinder/Elfinder/tinymce4.html.twig';
$result['params'] = [
'locale' => $locale,
'instance' => $instance,
'homeFolder' => $homeFolder,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
case 'fm_tinymce':
$result['template'] = '@FMElfinder/Elfinder/fm_tinymce.html.twig';
$result['params'] = [
'locale' => $locale,
'instance' => $instance,
'homeFolder' => $homeFolder,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
case 'form':
$result['template'] = '@FMElfinder/Elfinder/elfinder_type.html.twig';
$result['params'] = [
'locale' => $locale,
'fullscreen' => $fullScreen,
'instance' => $instance,
'homeFolder' => $homeFolder,
'id' => $formTypeId,
'relative_path' => $relativePath,
'prefix' => $assetsPath,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
'onlyMimes' => $onlyMimes,
];
return $result;
default:
$result['template'] = '@FMElfinder/Elfinder/simple.html.twig';
$result['params'] = [
'locale' => $locale,
'fullscreen' => $fullScreen,
'instance' => $instance,
'homeFolder' => $homeFolder,
'prefix' => $assetsPath,
'onlyMimes' => $onlyMimes,
'theme' => $theme,
'pathPrefix' => $pathPrefix,
];
return $result;
}
}
}
================================================
FILE: src/DependencyInjection/Compiler/ElFinderConfigurationPass.php
================================================
<?php
namespace FM\ElfinderBundle\DependencyInjection\Compiler;
use const E_USER_DEPRECATED;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass;
use function count;
use function trigger_error;
final class ElFinderConfigurationPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
// use main symfony dispatcher
if (!$container->hasDefinition('event_dispatcher') && !$container->hasAlias('event_dispatcher')) {
return;
}
$listeners = $container->findTaggedServiceIds('fm_elfinder.listener');
$subscribers = $container->findTaggedServiceIds('fm_elfinder.subscriber');
foreach ($listeners as $serviceId => $tags) {
@trigger_error('Using "fm_elfinder.listener" tag is deprecated, use "kernel.event_listener" instead.', E_USER_DEPRECATED);
}
foreach ($subscribers as $serviceId => $tags) {
@trigger_error('Using "fm_elfinder.subscriber" tag is deprecated, use "kernel.event_subscriber" instead.', E_USER_DEPRECATED);
}
if (count($listeners) > 0 || count($subscribers) > 0) {
$pass = new RegisterListenersPass('event_dispatcher', 'fm_elfinder.listener', 'fm_elfinder.subscriber');
$pass->process($container);
}
}
}
================================================
FILE: src/DependencyInjection/Compiler/TwigFormPass.php
================================================
<?php
namespace FM\ElfinderBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class TwigFormPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
if (!$container->hasParameter('twig.form.resources')) {
return;
}
$container->setParameter('twig.form.resources', array_merge(
['@FMElfinder/Form/elfinder_widget.html.twig'],
$container->getParameter('twig.form.resources')
));
}
}
================================================
FILE: src/DependencyInjection/Configuration.php
================================================
<?php
namespace FM\ElfinderBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use function method_exists;
final class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('fm_elfinder');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->fixXmlConfig('instance')
->children()
->scalarNode('configuration_provider')->defaultValue('fm_elfinder.configurator.default')->end()
->scalarNode('assets_path')->defaultValue('assets')->end()
->scalarNode('loader')->defaultValue('fm_elfinder.loader.default')->end()
->arrayNode('instances')
->isRequired()
->requiresAtLeastOneElement()
->useAttributeAsKey('name')
->prototype('array')
->children()
->scalarNode('locale')->defaultNull()->end()
->booleanNode('cors_support')->defaultFalse()->end()
->scalarNode('editor')->defaultValue('simple')->end()
->scalarNode('editor_template')->defaultNull()->end()
->booleanNode('fullscreen')->defaultTrue()->end()
->booleanNode('multi_home_folder')->defaultFalse()->end()
->scalarNode('folder_separator')->defaultValue('')->end()
->scalarNode('theme')->defaultValue('smoothness')->end() // jQuery UI theme name
->scalarNode('tinymce_popup_path')->defaultValue('')->end()
->booleanNode('relative_path')->defaultTrue()->end()
->scalarNode('path_prefix')->defaultValue('/')->end()
->arrayNode('where_is_multi')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue([])
->end()
->arrayNode('visible_mime_types')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue([])
->end()
->arrayNode('connector')
->addDefaultsIfNotSet()
->fixXmlConfig('root')
->children()
->booleanNode('debug')->defaultFalse()->end()
->append($this->createBindsNode())
->append($this->createPluginsNode())
->arrayNode('roots')
->useAttributeAsKey('name')
->isRequired()
->requiresAtLeastOneElement()
->prototype('array')
->children()
->scalarNode('driver')
->isRequired()
->end() // driver
->integerNode('volume_id')->defaultValue(0)->min(0)->end()
->scalarNode('path')->defaultValue('')->end()
->booleanNode('autoload')->defaultFalse()->end()
->scalarNode('phash')->defaultValue('')->end()
->scalarNode('trash_hash')->defaultValue('')->end()
->scalarNode('locale')->defaultValue('')->end()
->booleanNode('i18n_folder_name')->defaultFalse()->end()
->scalarNode('mime_detect')->defaultValue('auto')->end()
->scalarNode('mimefile')->defaultValue('')->end()
->scalarNode('security_voter')->defaultValue('')->end()
->scalarNode('start_path')->defaultValue('')->end()
->scalarNode('encoding')->defaultValue('UTF-8')->end()
->scalarNode('url')->defaultValue('')->end()
->scalarNode('alias')->defaultValue('')->end()
->scalarNode('img_lib')->defaultValue('auto')->end()
->scalarNode('tmb_path')->defaultValue('.tmb')->end()
->scalarNode('tmb_path_mode')->defaultValue(0777)->end()
->scalarNode('tmb_url')->defaultValue('')->end()
->integerNode('tmb_size')->defaultValue(48)->end()
->booleanNode('tmb_crop')->defaultTrue()->end()
->scalarNode('tmb_bg_color')->defaultValue('#ffffff')->end()
->scalarNode('quarantine')->defaultNull()->end()
->booleanNode('copy_overwrite')->defaultTrue()->end()
->booleanNode('copy_join')->defaultTrue()->end()
->booleanNode('copy_from')->defaultTrue()->end()
->booleanNode('copy_to')->defaultTrue()->end()
->booleanNode('upload_overwrite')->defaultTrue()->end()
->scalarNode('fileMode')->defaultValue(0644)->end()
->arrayNode('upload_allow')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue(['image'])
->end() // upload_allow
->arrayNode('upload_deny')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue(['all'])
->end() // upload_deny
->arrayNode('upload_order')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue(['deny', 'allow'])
->end() // upload_order
->scalarNode('upload_max_size')->defaultValue(0)->end()
->integerNode('upload_max_conn')->defaultValue(3)->end()
->arrayNode('defaults')
->useAttributeAsKey('defaults')
->normalizeKeys(false)
->prototype('boolean')->end()
->defaultValue(['read' => true, 'write' => true])
->end() // defaults
->arrayNode('attributes')
->prototype('array')
->children()
->scalarNode('pattern')->end()
->scalarNode('read')->defaultValue(true)->end()
->scalarNode('write')->defaultValue(true)->end()
->scalarNode('locked')->defaultValue(false)->end()
->scalarNode('hidden')->defaultValue(false)->end()
->end()
->end()
->defaultValue([])
->end() // attributes
->scalarNode('accepted_name')->defaultValue('/^\w[\w\s\.\%\-]*$/u')->end()
->booleanNode('show_hidden')->defaultFalse()->end()
->arrayNode('disabled_commands')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue([])
->end() // disabled_commands
->integerNode('tree_deep')->defaultValue(0)->end()
->integerNode('check_subfolders')->defaultValue(1)->end()
->scalarNode('separator')->defaultValue(DIRECTORY_SEPARATOR)->end()
->scalarNode('date_format')->defaultValue('j M Y H:i')->end()
->scalarNode('time_format')->defaultValue('H:i')->end()
->arrayNode('archive_mimes')
->beforeNormalization()
->ifTrue(function ($v) {
return is_string($v);
})
->then(function ($v) {
return array_map('trim', explode(',', $v));
})
->end()
->prototype('scalar')->end()
->defaultValue([])
->end() // archive_mimes
->arrayNode('archivers')
->canBeEnabled()
->children()
->arrayNode('create')
->prototype('array')
->children()
->scalarNode('cmd')->end()
->scalarNode('argc')->end()
->scalarNode('ext')->end()
->end()
->end()
->end()
->arrayNode('extract')
->prototype('array')
->children()
->scalarNode('cmd')->end()
->scalarNode('argc')->end()
->scalarNode('ext')->end()
->end()
->end()
->end()
->end()
->end() // archivers
->arrayNode('flysystem')
->canBeEnabled()
->children()
->scalarNode('filesystem')->defaultValue('')->end()
->scalarNode('type')->defaultValue('')->end()
->scalarNode('adapter_service')->defaultValue('')->end()
->append($this->createFlysystemNode())
->end()
->end()
->scalarNode('glide_url')->defaultValue('')->end()
->scalarNode('glide_key')->defaultValue('')->end()
->append($this->createPluginsNode())
->append($this->createDriverOptionsNode())
->arrayNode('dropbox2_settings')
->canBeEnabled()
->children()
->scalarNode('app_key')->end()
->scalarNode('app_secret')->end()
->scalarNode('access_token')->end()
->scalarNode('aliasFormat')->defaultValue('%s@Dropbox')->end()
->scalarNode('path')->defaultValue('/')->end()
->scalarNode('separator')->defaultValue('/')->end()
->scalarNode('acceptedName')->defaultValue('%s@Dropbox')->end()
->scalarNode('rootCssClass')->defaultValue('elfinder-navbar-root-dropbox')->end()
->arrayNode('publishPermission')
->children()
->scalarNode('requested_visibility')->defaultValue('public')->end()
->end()
->end()
->scalarNode('getThumbSize')->defaultValue('medium')->end()
->end()
->end()
->arrayNode('box_settings')
->canBeEnabled()
->children()
->scalarNode('client_id')->end()
->scalarNode('client_secret')->end()
->scalarNode('accessToken')->end()
->scalarNode('root')->defaultValue('Box.com')->end()
->scalarNode('path')->defaultValue('/')->end()
->scalarNode('separator')->defaultValue('/')->end()
->scalarNode('tmbPath')->defaultValue('')->end()
->scalarNode('tmbURL')->defaultValue('')->end()
->scalarNode('tmpPath')->defaultValue('')->end()
->scalarNode('acceptedName')->defaultValue('#^[^/\\?*:|"<>]*[^./\\?*:|"<>]$#')->end()
->scalarNode('rootCssClass')->defaultValue('elfinder-navbar-root-box')->end()
->end()
->end()
->arrayNode('onedrive_settings')
->canBeEnabled()
->children()
->scalarNode('client_id')->end()
->scalarNode('client_secret')->end()
->scalarNode('accessToken')->end()
->scalarNode('root')->defaultValue('OneDrive.com')->end()
->scalarNode('OneDriveApiClient')->defaultValue('')->end()
->scalarNode('path')->defaultValue('/')->end()
->scalarNode('separator')->defaultValue('/')->end()
->scalarNode('tmbPath')->defaultValue('')->end()
->scalarNode('tmbURL')->defaultValue('')->end()
->scalarNode('tmpPath')->defaultValue('')->end()
->scalarNode('acceptedName')->defaultValue('#^[^/\\?*:|"<>]*[^./\\?*:|"<>]$#')->end()
->scalarNode('rootCssClass')->defaultValue('elfinder-navbar-root-onedrive')->end()
->booleanNode('useApiThumbnail')->defaultTrue()->end()
->end()
->end()
->arrayNode('ftp_settings')
->canBeEnabled()
->children()
->scalarNode('host')->end()
->scalarNode('user')->end()
->scalarNode('password')->end()
->scalarNode('path')->end()
->end()
->end()
->arrayNode('mysql_settings')
->canBeEnabled()
->children()
->scalarNode('host')->end()
->scalarNode('user')->end()
->scalarNode('pass')->end()
->scalarNode('db')->end()
->scalarNode('port')->defaultNull()->end()
->scalarNode('socket')->defaultNull()->end()
->scalarNode('files_table')->defaultValue('elfinder_file')->end()
->scalarNode('tmbPath')->defaultValue('')->end()
->scalarNode('tmpPath')->defaultValue('')->end()
->scalarNode('rootCssClass')->defaultValue('elfinder-navbar-root-sql')->end()
->scalarNode('noSessionCache')->defaultValue('hasdirs')->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end();
return $treeBuilder;
}
/**
* @return NodeDefinition the Flysystem node
*/
private function createFlysystemNode()
{
return $this->createNode('options')
->children()
->arrayNode('local')
->canBeEnabled()
->children()
->scalarNode('path')->defaultvalue('')->end()
->end()
->end()
->arrayNode('ftp')
->canBeEnabled()
->children()
->scalarNode('host')->defaultValue('')->end()
->scalarNode('username')->defaultValue('')->end()
->scalarNode('password')->defaultValue('')->end()
->integerNode('port')->defaultValue(21)->end()
->booleanNode('passive')->defaultTrue()->end()
->booleanNode('ssl')->defaultTrue()->end()
->integerNode('timeout')->defaultValue(30)->end()
->scalarNode('root')->defaultValue('/')->end()
->integerNode('directoryPerm')->defaultValue(0744)->end()
->end()
->end()
->arrayNode('sftp')
->canBeEnabled()
->children()
->scalarNode('host')->defaultValue('')->end()
->scalarNode('username')->defaultValue('')->end()
->scalarNode('password')->defaultValue('')->end()
->integerNode('port')->defaultValue(21)->end()
->scalarNode('privateKey')->defaultValue('')->end()
->integerNode('timeout')->defaultValue(10)->end()
->scalarNode('root')->defaultValue('/')->end()
->end()
->end()
->arrayNode('azure')
->canBeEnabled()
->children()
->scalarNode('account_name')->defaultvalue('')->end()
->scalarNode('account_key')->defaultvalue('')->end()
->scalarNode('container_name')->defaultvalue('')->end()
->end()
->end()
->arrayNode('aws_s3_v2')
->canBeEnabled()
->children()
->scalarNode('key')->defaultvalue('')->end()
->scalarNode('secret')->defaultvalue('')->end()
->scalarNode('region')->defaultvalue('')->end()
->scalarNode('bucket_name')->defaultvalue('')->end()
->scalarNode('optional_prefix')->defaultvalue('')->end()
->scalarNode('base_url')->defaultvalue('')->end()
->end()
->end()
->arrayNode('aws_s3_v3')
->canBeEnabled()
->children()
->scalarNode('key')->defaultvalue('')->end()
->scalarNode('secret')->defaultvalue('')->end()
->scalarNode('region')->defaultvalue('')->end()
->scalarNode('version')->defaultvalue('')->end()
->scalarNode('bucket_name')->defaultvalue('')->end()
->scalarNode('optional_prefix')->defaultvalue('')->end()
->scalarNode('endpoint')->defaultNull()->end()
->booleanNode('use_path_style_endpoint')->defaultFalse()->end()
->booleanNode('use_aws_shared_config_files')->defaultTrue()->end()
->arrayNode('options')
->canBeEnabled()
->children()
->scalarNode('ACL')->defaultvalue('')->end()
->end()
->end()
->end()
->end()
->arrayNode('copy_com')
->canBeEnabled()
->children()
->scalarNode('consumer_key')->defaultvalue('')->end()
->scalarNode('consumer_secret')->defaultvalue('')->end()
->scalarNode('access_token')->defaultvalue('')->end()
->scalarNode('token_secret')->defaultvalue('')->end()
->scalarNode('optional_prefix')->defaultvalue('')->end()
->end()
->end()
->arrayNode('gridfs')
->canBeEnabled()
->children()
->scalarNode('db_name')->defaultvalue('')->end()
->end()
->end()
->arrayNode('zip')
->canBeEnabled()
->children()
->scalarNode('path')->defaultvalue('')->end()
->end()
->end()
->arrayNode('dropbox')
->canBeEnabled()
->children()
->scalarNode('app')->defaultvalue('')->end()
->scalarNode('token')->defaultvalue('')->end()
->end()
->end()
->arrayNode('rackspace')
->canBeEnabled()
->children()
->scalarNode('username')->defaultValue('')->end()
->scalarNode('apikey')->defaultValue('')->end()
->scalarNode('endpoint')->defaultValue('')->end()
->scalarNode('container')->defaultValue('')->end()
->scalarNode('region')->defaultValue('')->end()
->end()
->end()
->end();
}
/**
* @return NodeDefinition the plugins node
*/
private function createPluginsNode()
{
return $this->createNode('plugins')
->useAttributeAsKey('name')
->prototype('array')
->useAttributeAsKey('name')
->prototype('variable')->end()
->end();
}
/**
* @return NodeDefinition the bind node
*/
private function createBindsNode()
{
return $this->createNode('binds')
->useAttributeAsKey('name')
->prototype('array')
->useAttributeAsKey('name')
->prototype('variable')->end()
->end();
}
/**
* @return NodeDefinition the bind node
*/
private function createDriverOptionsNode()
{
return $this->createNode('driver_options')
->useAttributeAsKey('name')
->prototype('array')
->useAttributeAsKey('name')
->prototype('variable')->end()
->end();
}
/**
* @param string $name the node name
*
* @return NodeDefinition the node
*/
private function createNode($name)
{
$treeBuilder = new TreeBuilder($name);
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
$rootNode = $treeBuilder->root($name);
}
return $rootNode;
}
}
================================================
FILE: src/DependencyInjection/FMElfinderExtension.php
================================================
<?php
namespace FM\ElfinderBundle\DependencyInjection;
use FM\ElfinderBundle\Controller\ElFinderController;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
final class FMElfinderExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container): void
{
$config = $this->processConfiguration(new Configuration(), $configs);
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
$loader->load('elfinder.yaml');
$loader->load('form.yaml');
$loader->load('command.yaml');
$container->setParameter('fm_elfinder', $config);
$repo = $container->getDefinition(ElFinderController::class);
$repo->replaceArgument(1, $config);
$container->setAlias('fm_elfinder.configurator', $config['configuration_provider']);
$container->setAlias('fm_elfinder.loader', $config['loader']);
$container->getAlias('fm_elfinder.loader')->setPublic(true);
}
public function getNamespace(): string
{
return 'http://helios-ag.github.io/schema/dic/fm_elfinder';
}
}
================================================
FILE: src/ElFinder/ElFinder.php
================================================
<?php
namespace FM\ElfinderBundle\ElFinder;
use elFinder as BaseElFinder;
use elFinderSession;
use elFinderSessionInterface;
class ElFinder extends BaseElFinder
{
/**
* Constructor.
*
* @param array elFinder and roots configurations
*/
public function __construct($opts)
{
// set default_charset
if (version_compare(PHP_VERSION, '5.6', '>=')) {
ini_set('internal_encoding', 'UTF-8');
ini_set('default_charset', 'UTF-8');
}
// define accept constant of server commands path
!defined('ELFINDER_TAR_PATH') && define('ELFINDER_TAR_PATH', 'tar');
!defined('ELFINDER_GZIP_PATH') && define('ELFINDER_GZIP_PATH', 'gzip');
!defined('ELFINDER_BZIP2_PATH') && define('ELFINDER_BZIP2_PATH', 'bzip2');
!defined('ELFINDER_XZ_PATH') && define('ELFINDER_XZ_PATH', 'xz');
!defined('ELFINDER_ZIP_PATH') && define('ELFINDER_ZIP_PATH', 'zip');
!defined('ELFINDER_UNZIP_PATH') && define('ELFINDER_UNZIP_PATH', 'unzip');
!defined('ELFINDER_RAR_PATH') && define('ELFINDER_RAR_PATH', 'rar');
!defined('ELFINDER_UNRAR_PATH') && define('ELFINDER_UNRAR_PATH', 'unrar');
!defined('ELFINDER_7Z_PATH') && define('ELFINDER_7Z_PATH', ('WIN' === substr(PHP_OS, 0, 3)) ? '7z' : '7za');
!defined('ELFINDER_CONVERT_PATH') && define('ELFINDER_CONVERT_PATH', 'convert');
!defined('ELFINDER_EXIFTRAN_PATH') && define('ELFINDER_EXIFTRAN_PATH', 'exiftran');
!defined('ELFINDER_JPEGTRAN_PATH') && define('ELFINDER_JPEGTRAN_PATH', 'jpegtran');
!defined('ELFINDER_FFMPEG_PATH') && define('ELFINDER_FFMPEG_PATH', 'ffmpeg');
!defined('ELFINDER_IMAGEMAGICK_PS') && define('ELFINDER_IMAGEMAGICK_PS', false);
// for backward compat
$this->version = (string) self::$ApiVersion;
// set error handler of WARNING, NOTICE
$errLevel = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR;
if (defined('E_DEPRECATED')) {
$errLevel |= E_DEPRECATED | E_USER_DEPRECATED;
}
set_error_handler(elFinder::phpErrorHandler(...), $errLevel);
// Associative array of files to delete at the end of script: ['temp file path' => true]
$GLOBALS['elFinderTempFiles'] = [];
// regist Shutdown function
register_shutdown_function(['elFinder', 'onShutdown']);
// convert PATH_INFO to GET query
if (!empty($_SERVER['PATH_INFO'])) {
$_ps = explode('/', trim($_SERVER['PATH_INFO'], '/'));
if (!isset($_GET['cmd'])) {
$_cmd = $_ps[0];
if (isset($this->commands[$_cmd])) {
$_GET['cmd'] = $_cmd;
$_i = 1;
foreach (array_keys($this->commands[$_cmd]) as $_k) {
if (isset($_ps[$_i])) {
if (!isset($_GET[$_k])) {
$_GET[$_k] = $_ps[$_i];
}
} else {
break;
}
}
}
}
}
// set elFinder instance
self::$instance = $this;
// setup debug mode
$this->debug = (isset($opts['debug']) && $opts['debug'] ? true : false);
if ($this->debug) {
error_reporting(defined('ELFINDER_DEBUG_ERRORLEVEL') ? ELFINDER_DEBUG_ERRORLEVEL : -1);
ini_set('diaplay_errors', '1');
// clear output buffer and stop output filters
while (ob_get_level() && ob_end_clean()) {
}
}
if (!interface_exists('elFinderSessionInterface')) {
include_once dirname(__FILE__) . '/elFinderSessionInterface.php';
}
// session handler
if (!empty($opts['session']) && $opts['session'] instanceof elFinderSessionInterface) {
$this->session = $opts['session'];
} else {
$sessionOpts = [
'base64encode' => !empty($opts['base64encodeSessionData']),
'keys' => [
'default' => !empty($opts['sessionCacheKey']) ? $opts['sessionCacheKey'] : 'elFinderCaches',
'netvolume' => !empty($opts['netVolumesSessionKey']) ? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes',
],
];
$this->session = new elFinderSession($sessionOpts);
}
// try session start | restart
$this->session->start();
$sessionUseCmds = [];
if (isset($opts['sessionUseCmds']) && is_array($opts['sessionUseCmds'])) {
$sessionUseCmds = $opts['sessionUseCmds'];
}
// set self::$volumesCnt by HTTP header "X-elFinder-VolumesCntStart"
if (isset($_SERVER['HTTP_X_ELFINDER_VOLUMESCNTSTART']) && ($volumesCntStart = intval($_SERVER['HTTP_X_ELFINDER_VOLUMESCNTSTART']))) {
self::$volumesCnt = $volumesCntStart;
}
$this->time = $this->utime();
$this->sessionCloseEarlier = isset($opts['sessionCloseEarlier']) ? (bool) $opts['sessionCloseEarlier'] : true;
$this->sessionUseCmds = array_flip($sessionUseCmds);
$this->timeout = ($opts['timeout'] ?? 0);
$this->uploadTempPath = ($opts['uploadTempPath'] ?? '');
$this->callbackWindowURL
gitextract_hjyck40z/
├── .devcontainer/
│ └── devcontainer.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ └── test.yaml
├── .gitignore
├── .php-cs-fixer.php
├── .symfony.bundle.yaml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── composer.json
├── config/
│ ├── command.yaml
│ ├── elfinder.yaml
│ └── form.yaml
├── docs/
│ ├── advanced-configuration.md
│ ├── ckeditor-integration.md
│ ├── configuration-dump.md
│ ├── cors-support.md
│ ├── elfinder-form-type.md
│ ├── events-listeners-subscribers.md
│ ├── flysystem.md
│ ├── summernote-integration.md
│ └── tinymce-integration.md
├── phpunit.xml.dist
├── src/
│ ├── Bridge/
│ │ └── ElFinderBridge.php
│ ├── Command/
│ │ └── ElFinderInstallerCommand.php
│ ├── Configuration/
│ │ ├── ElFinderConfigurationProviderInterface.php
│ │ └── ElFinderConfigurationReader.php
│ ├── Connector/
│ │ └── ElFinderConnector.php
│ ├── Controller/
│ │ └── ElFinderController.php
│ ├── DependencyInjection/
│ │ ├── Compiler/
│ │ │ ├── ElFinderConfigurationPass.php
│ │ │ └── TwigFormPass.php
│ │ ├── Configuration.php
│ │ └── FMElfinderExtension.php
│ ├── ElFinder/
│ │ └── ElFinder.php
│ ├── Event/
│ │ ├── ElFinderPostExecutionEvent.php
│ │ └── ElFinderPreExecutionEvent.php
│ ├── FMElfinderBundle.php
│ ├── Form/
│ │ └── Type/
│ │ └── ElFinderType.php
│ ├── Loader/
│ │ ├── ElFinderLoader.php
│ │ └── ElFinderLoaderInterface.php
│ ├── Resources/
│ │ ├── config/
│ │ │ └── routing.yaml
│ │ ├── public/
│ │ │ └── tinymceElfinder.js
│ │ └── views/
│ │ ├── Elfinder/
│ │ │ ├── ckeditor.html.twig
│ │ │ ├── elfinder_type.html.twig
│ │ │ ├── fm_tinymce.html.twig
│ │ │ ├── helper/
│ │ │ │ ├── _summernote.html.twig
│ │ │ │ ├── _tinymce.html.twig
│ │ │ │ ├── _tinymce4.html.twig
│ │ │ │ ├── _tinymce5.html.twig
│ │ │ │ └── main.js.twig
│ │ │ ├── simple.html.twig
│ │ │ ├── summernote.html.twig
│ │ │ ├── tinymce.html.twig
│ │ │ └── tinymce4.html.twig
│ │ └── Form/
│ │ └── elfinder_widget.html.twig
│ ├── Security/
│ │ └── ElfinderSecurityInterface.php
│ ├── Session/
│ │ └── ElFinderSession.php
│ └── Twig/
│ └── Extension/
│ └── FMElfinderExtension.php
└── tests/
├── Command/
│ └── ElFinderInstallerCommandTest.php
├── Configuration/
│ └── ElFinderConfigurationReaderTest.php
├── DependencyInjection/
│ ├── Compiler/
│ │ └── TwigFormPassTest.php
│ ├── ConfigurationLoadTest.php
│ └── FMElfinderExtensionTest.php
├── Event/
│ ├── ElFinderPostExecutionEventTest.php
│ └── ElFinderPreExecutionEventTest.php
├── FMElfinderBundleTest.php
├── Fixtures/
│ └── config/
│ ├── config.php
│ └── config.yml
├── Form/
│ └── Type/
│ └── ElFinderTypeTest.php
├── Functional/
│ ├── AppKernel.php
│ └── config/
│ ├── config.yml
│ ├── config_test.yml
│ └── routing.yml
├── Loader/
│ └── ElFinderLoaderTest.php
├── Twig/
│ └── Extension/
│ └── FMElfinderExtensionTest.php
├── autoload.php
└── bootstrap.php
SYMBOL INDEX (162 symbols across 32 files)
FILE: src/Bridge/ElFinderBridge.php
class ElFinderBridge (line 9) | class ElFinderBridge extends ElFinder
method __construct (line 14) | public function __construct($opts)
method setSession (line 22) | public function setSession($session)
method getVolumes (line 27) | public function getVolumes(): array
method mountVolumes (line 35) | protected function mountVolumes($opts)
FILE: src/Command/ElFinderInstallerCommand.php
class ElFinderInstallerCommand (line 15) | #[AsCommand(
method __construct (line 29) | public function __construct(
method configure (line 36) | protected function configure(): void
method execute (line 52) | protected function execute(InputInterface $input, OutputInterface $out...
FILE: src/Configuration/ElFinderConfigurationProviderInterface.php
type ElFinderConfigurationProviderInterface (line 5) | interface ElFinderConfigurationProviderInterface
method getConfiguration (line 7) | public function getConfiguration(string $instance): array;
FILE: src/Configuration/ElFinderConfigurationReader.php
class ElFinderConfigurationReader (line 31) | class ElFinderConfigurationReader implements ElFinderConfigurationProvid...
method __construct (line 41) | public function __construct(array $parameters, RequestStack $requestSt...
method getConfiguration (line 48) | public function getConfiguration(string $instance): array
method access (line 158) | public function access($attr, $path, $data, $volume)
method parseSecurityConfiguration (line 168) | protected function parseSecurityConfiguration(ElfinderSecurityInterfac...
method getURL (line 185) | private function getURL(array $parameter, Request $request, string $ho...
method configureFlysystem (line 203) | private function configureFlysystem($opt, $adapter, $serviceName)
method getFlysystemFilesystem (line 331) | private function getFlysystemFilesystem(string $serviceName): Filesystem
method configureDriver (line 342) | private function configureDriver(array $parameter): array
FILE: src/Connector/ElFinderConnector.php
class ElFinderConnector (line 7) | class ElFinderConnector extends \elFinderConnector
method run (line 9) | public function run($queryParameters = null)
method execute (line 18) | public function execute($queryParameters)
method output (line 77) | protected function output(array $data)
FILE: src/Controller/ElFinderController.php
class ElFinderController (line 21) | class ElFinderController
method __construct (line 27) | public function __construct(Environment $twig, array $params, ElFinder...
method show (line 39) | public function show(Request $request, string $instance, string $homeF...
method load (line 58) | public function load(SessionInterface $session, HttpKernelInterface $h...
method mainJS (line 80) | public function mainJS(): Response
method selectEditor (line 98) | private function selectEditor(array $parameters, string $instance, str...
FILE: src/DependencyInjection/Compiler/ElFinderConfigurationPass.php
class ElFinderConfigurationPass (line 14) | final class ElFinderConfigurationPass implements CompilerPassInterface
method process (line 16) | public function process(ContainerBuilder $container): void
FILE: src/DependencyInjection/Compiler/TwigFormPass.php
class TwigFormPass (line 8) | class TwigFormPass implements CompilerPassInterface
method process (line 10) | public function process(ContainerBuilder $container): void
FILE: src/DependencyInjection/Configuration.php
class Configuration (line 11) | final class Configuration implements ConfigurationInterface
method getConfigTreeBuilder (line 16) | public function getConfigTreeBuilder(): TreeBuilder
method createFlysystemNode (line 326) | private function createFlysystemNode()
method createPluginsNode (line 447) | private function createPluginsNode()
method createBindsNode (line 460) | private function createBindsNode()
method createDriverOptionsNode (line 473) | private function createDriverOptionsNode()
method createNode (line 488) | private function createNode($name)
FILE: src/DependencyInjection/FMElfinderExtension.php
class FMElfinderExtension (line 11) | final class FMElfinderExtension extends Extension
method load (line 16) | public function load(array $configs, ContainerBuilder $container): void
method getNamespace (line 33) | public function getNamespace(): string
FILE: src/ElFinder/ElFinder.php
class ElFinder (line 9) | class ElFinder extends BaseElFinder
method __construct (line 16) | public function __construct($opts)
method mountVolumes (line 265) | protected function mountVolumes($opts)
FILE: src/Event/ElFinderPostExecutionEvent.php
class ElFinderPostExecutionEvent (line 8) | class ElFinderPostExecutionEvent extends ElFinderPreExecutionEvent
method __construct (line 16) | public function __construct(Request $request, HttpKernelInterface $htt...
method hasErrors (line 26) | public function hasErrors(): bool
method getResult (line 31) | public function getResult(): array
method setResult (line 36) | public function setResult(array $result): void
FILE: src/Event/ElFinderPreExecutionEvent.php
class ElFinderPreExecutionEvent (line 9) | class ElFinderPreExecutionEvent extends Event
method __construct (line 23) | public function __construct(Request $request, HttpKernelInterface $htt...
method subRequest (line 42) | public function subRequest(array $path, array $query)
method getCommand (line 53) | public function getCommand(): string
method getRequest (line 58) | public function getRequest(): Request
method getInstance (line 63) | public function getInstance(): string
method getHomeFolder (line 68) | public function getHomeFolder(): string
FILE: src/FMElfinderBundle.php
class FMElfinderBundle (line 10) | class FMElfinderBundle extends Bundle
method build (line 12) | public function build(ContainerBuilder $container): void
FILE: src/Form/Type/ElFinderType.php
class ElFinderType (line 11) | class ElFinderType extends AbstractType
method buildForm (line 16) | public function buildForm(FormBuilderInterface $builder, array $option...
method buildView (line 29) | public function buildView(FormView $view, FormInterface $form, array $...
method configureOptions (line 42) | public function configureOptions(OptionsResolver $resolver): void
method getParent (line 58) | public function getParent(): ?string
method getName (line 70) | public function getName(): string
method getBlockPrefix (line 78) | public function getBlockPrefix(): string
FILE: src/Loader/ElFinderLoader.php
class ElFinderLoader (line 12) | class ElFinderLoader implements ElFinderLoaderInterface
method __construct (line 24) | public function __construct(ElFinderConfigurationProviderInterface $co...
method configure (line 32) | public function configure(): array
method initBridge (line 43) | public function initBridge(string $instance, array $efParameters): void
method load (line 73) | public function load(Request $request): array|string
method setInstance (line 84) | public function setInstance(string $instance): void
method setConfigurator (line 89) | public function setConfigurator(ElFinderConfigurationProviderInterface...
method encode (line 97) | public function encode(string $path): mixed
method decode (line 119) | public function decode(string $hash): string
method setSession (line 127) | public function setSession(?SessionInterface $session): void
FILE: src/Loader/ElFinderLoaderInterface.php
type ElFinderLoaderInterface (line 12) | interface ElFinderLoaderInterface
method configure (line 17) | public function configure(): array;
method initBridge (line 24) | public function initBridge(string $instance, array $efParameters);
method load (line 26) | public function load(Request $request): array|string;
method setInstance (line 28) | public function setInstance(string $instance): void;
method setConfigurator (line 30) | public function setConfigurator(ElFinderConfigurationProviderInterface...
method encode (line 32) | public function encode(string $path): mixed;
method decode (line 34) | public function decode(string $hash): string;
method setSession (line 36) | public function setSession(?SessionInterface $session): void;
FILE: src/Security/ElfinderSecurityInterface.php
type ElfinderSecurityInterface (line 5) | interface ElfinderSecurityInterface
method getConfiguration (line 12) | public function getConfiguration(): array;
FILE: src/Session/ElFinderSession.php
class ElFinderSession (line 8) | class ElFinderSession implements elFinderSessionInterface
method __construct (line 12) | public function __construct(SessionInterface $session)
method start (line 17) | public function start()
method close (line 22) | public function close()
method get (line 27) | public function get($key, $empty = '')
method set (line 32) | public function set($key, $data)
method remove (line 37) | public function remove($key)
FILE: src/Twig/Extension/FMElfinderExtension.php
class FMElfinderExtension (line 12) | class FMElfinderExtension extends AbstractExtension
method __construct (line 16) | public function __construct(Environment $twig)
method getFunctions (line 26) | public function getFunctions(): array
method tinymce (line 43) | public function tinymce(string $instance = 'default', array $parameter...
method tinymce4 (line 65) | public function tinymce4(string $instance = 'default', array $paramete...
method tinymce5 (line 78) | public function tinymce5(string $instance = 'default'): string
method summernote (line 92) | public function summernote(
method getName (line 114) | public function getName(): string
FILE: tests/Command/ElFinderInstallerCommandTest.php
class ElFinderInstallerCommandTest (line 13) | class ElFinderInstallerCommandTest extends TestCase
method setUp (line 21) | protected function setUp(): void
method testExecuteWithDefaultDocroot (line 47) | public function testExecuteWithDefaultDocroot(): void
method testExecuteWithCustomDocroot (line 55) | public function testExecuteWithCustomDocroot(): void
method assertFileSystemOperations (line 63) | private function assertFileSystemOperations(string $docroot): void
method assertCommandOutput (line 95) | private function assertCommandOutput(): void
FILE: tests/Configuration/ElFinderConfigurationReaderTest.php
class ElFinderConfigurationReaderTest (line 8) | class ElFinderConfigurationReaderTest extends \PHPUnit\Framework\TestCase
method getConfigurationReader (line 20) | private function getConfigurationReader($attributesObject)
method getDefaultAttributesObject (line 294) | private function getDefaultAttributesObject()
method getHomeFolderAwareAttributesObject (line 306) | private function getHomeFolderAwareAttributesObject()
method testConfiguration (line 319) | public function testConfiguration(): void
method testSubClassOfHelper (line 328) | public function testSubClassOfHelper(): void
method testAccessHidden (line 335) | public function testAccessHidden(): void
method testAccessVisible (line 343) | public function testAccessVisible()
method testPathAndUrlAndHomeFolder (line 351) | public function testPathAndUrlAndHomeFolder(): void
method testAccessTmbURLOption (line 384) | public function testAccessTmbURLOption(): void
FILE: tests/DependencyInjection/Compiler/TwigFormPassTest.php
class TwigFormPassTest (line 8) | class TwigFormPassTest extends \PHPUnit\Framework\TestCase
method testProcess (line 10) | public function testProcess()
FILE: tests/DependencyInjection/ConfigurationLoadTest.php
class ConfigurationLoadTest (line 12) | class ConfigurationLoadTest extends AbstractExtensionConfigurationTestCase
method getContainerExtension (line 14) | protected function getContainerExtension(): ExtensionInterface
method getConfiguration (line 19) | protected function getConfiguration(): ConfigurationInterface
method testSupportsAllConfigFormats (line 24) | #[DataProvider('getSupportsAllConfigFormatsData')]
method getSupportsAllConfigFormatsData (line 187) | public static function getSupportsAllConfigFormatsData(): array
FILE: tests/DependencyInjection/FMElfinderExtensionTest.php
class FMElfinderExtensionTest (line 10) | class FMElfinderExtensionTest extends AbstractExtensionTestCase
method getContainerExtensions (line 12) | protected function getContainerExtensions(): array
method testServices (line 19) | public function testServices()
method testMinimumConfiguration (line 28) | public function testMinimumConfiguration()
method getMinimalConfiguration (line 36) | protected function getMinimalConfiguration(): array
FILE: tests/Event/ElFinderPostExecutionEventTest.php
class ElFinderPostExecutionEventTest (line 8) | class ElFinderPostExecutionEventTest extends \PHPUnit\Framework\TestCase
method testHasErrors (line 10) | public function testHasErrors()
FILE: tests/Event/ElFinderPreExecutionEventTest.php
class ElFinderPreExecutionEventTest (line 8) | class ElFinderPreExecutionEventTest extends \PHPUnit\Framework\TestCase
method testGetCommand (line 10) | public function testGetCommand()
method testSubRequest (line 19) | public function testSubRequest()
FILE: tests/FMElfinderBundleTest.php
class FMElfinderBundleTest (line 9) | class FMElfinderBundleTest extends \PHPUnit\Framework\TestCase
method testBundle (line 11) | public function testBundle(): void
FILE: tests/Form/Type/ElFinderTypeTest.php
class ElFinderTypeTest (line 9) | class ElFinderTypeTest extends \PHPUnit\Framework\TestCase
method testGetName (line 11) | public function testGetName()
method testConfigureOptions (line 17) | public function testConfigureOptions()
method testBuildView (line 27) | public function testBuildView()
FILE: tests/Functional/AppKernel.php
class AppKernel (line 6) | class AppKernel extends Kernel
method registerBundles (line 8) | public function registerBundles()
method registerContainerConfiguration (line 19) | public function registerContainerConfiguration(LoaderInterface $loader)
FILE: tests/Loader/ElFinderLoaderTest.php
class ElFinderLoaderTest (line 8) | class ElFinderLoaderTest extends \PHPUnit\Framework\TestCase
method setUp (line 14) | public function setUp(): void
method testConfigure (line 24) | public function testConfigure()
FILE: tests/Twig/Extension/FMElfinderExtensionTest.php
class FMElfinderExtensionTest (line 16) | class FMElfinderExtensionTest extends \PHPUnit\Framework\TestCase
method setUp (line 33) | protected function setUp(): void
method testRenderTinyMCE3 (line 45) | public function testRenderTinyMCE3()
method testRenderTinyMCE4 (line 75) | public function testRenderTinyMCE4()
method testRenderSummernote (line 101) | public function testRenderSummernote()
method testName (line 120) | public function testName()
method tearDown (line 128) | protected function tearDown(): void
method normalizeOutput (line 141) | protected function normalizeOutput($output)
method testSubClassOfTwigExtension (line 146) | public function testSubClassOfTwigExtension()
method testSummernoteInstanceNotString (line 153) | public function testSummernoteInstanceNotString()
method testTinyMCEInstanceNotString (line 159) | public function testTinyMCEInstanceNotString()
method testTinyMCE4InstanceNotString (line 165) | public function testTinyMCE4InstanceNotString()
method testGetFunctions (line 171) | public function testGetFunctions()
Condensed preview — 81 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (337K chars).
[
{
"path": ".devcontainer/devcontainer.json",
"chars": 1007,
"preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.co"
},
{
"path": ".github/ISSUE_TEMPLATE/Bug_report.md",
"chars": 344,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\n\n---\n\n**Describe the bug**\nExplain what you wanted to do "
},
{
"path": ".github/ISSUE_TEMPLATE/Feature_request.md",
"chars": 298,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\n\n---\n\n**Short description of what this feature will al"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 207,
"preview": "<!--\nThanks for your contribution! If you are proposing a new feature that is complex,\nplease open an issue first so we "
},
{
"path": ".github/dependabot.yml",
"chars": 131,
"preview": "version: 2\nupdates:\n- package-ecosystem: composer\n directory: \"/\"\n schedule:\n interval: weekly\n open-pull-requests"
},
{
"path": ".github/workflows/test.yaml",
"chars": 1438,
"preview": "# OS: Linux; Symfony: latest stable; PHP: all the commonly used versions supported by this bundle\nname: \"Tests\"\n\non:\n p"
},
{
"path": ".gitignore",
"chars": 369,
"preview": "composer.lock\nTests/cache\nTests/log\nTests/Functional/cache\nTests/Functional/log\nvendor\n.php-cs-fixer.cache\nclover.xml\n.v"
},
{
"path": ".php-cs-fixer.php",
"chars": 3253,
"preview": "<?php\n\nreturn (new PhpCsFixer\\Config())\n ->setRiskyAllowed(false)\n ->setRules([\n '@Symfony' => true,\n "
},
{
"path": ".symfony.bundle.yaml",
"chars": 133,
"preview": "branches: [\"main\"]\nmaintained_branches: [\"main\"]\ncurrent_branch: \"main\"\ndev_branch: \"main\"\ndev_branch_alias: \"12.x\"\ndoc_"
},
{
"path": "CHANGELOG.md",
"chars": 51048,
"preview": "#\n\n## [12.1.2](https://github.com/helios-ag/FMElfinderBundle/tree/12.1.2) (2022-01-21)\n\n**Merged pull requests:**\n\n- Fix"
},
{
"path": "CONTRIBUTING.md",
"chars": 1545,
"preview": "Contribution Guidelines\n=======================\n\nFirst of all, each single contribution is appreciated, whether a typo f"
},
{
"path": "LICENSE",
"chars": 1051,
"preview": "Copyright (c) 2012- Al Ganiev\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this softw"
},
{
"path": "README.md",
"chars": 12217,
"preview": "FMElfinderBundle\n================\n\n[ElFinder](https://github.com/Studio-42/elFinder) integration in Symfony\n\n### Code Qu"
},
{
"path": "composer.json",
"chars": 2900,
"preview": "{\n \"name\": \"helios-ag/fm-elfinder-bundle\",\n \"description\": \"ElFinder bundle, adds ElFinder file manager to your Sy"
},
{
"path": "config/command.yaml",
"chars": 362,
"preview": "services:\n fm_elfinder.command.installer:\n class: FM\\ElfinderBundle\\Command\\ElFinderInstallerCommand\n a"
},
{
"path": "config/elfinder.yaml",
"chars": 1062,
"preview": "parameters:\n fm_elfinder.loader: FM\\ElfinderBundle\\Loader\\ElFinderLoader\n fm_elfinder.configurator: FM\\ElfinderBun"
},
{
"path": "config/form.yaml",
"chars": 214,
"preview": "parameters:\n elfinder.form.type.class: FM\\ElfinderBundle\\Form\\Type\\ElFinderType\n\nservices:\n fm_elfinder.form.type:"
},
{
"path": "docs/advanced-configuration.md",
"chars": 5563,
"preview": "# Advanced configuration\n\n## Custom configuration provider\n\nElFinder bundle allows to override his configuration provide"
},
{
"path": "docs/ckeditor-integration.md",
"chars": 1424,
"preview": "# CKEditor integration\n\nMostly filebrowsers used with WYSIWYG editors to upload images and other files. There are two bu"
},
{
"path": "docs/configuration-dump.md",
"chars": 13687,
"preview": "# Bundle configuration dump \n\n```\n# Default configuration for extension with alias: \"fm_elfinder\"\nfm_elfinder:\n confi"
},
{
"path": "docs/cors-support.md",
"chars": 1272,
"preview": "# CORS support\n\nIf you want access connector URL from an other domain on the client side,\nsimply configure FMElFinder bu"
},
{
"path": "docs/elfinder-form-type.md",
"chars": 3939,
"preview": "# Elfinder Form Type\n\n## Configuration\n\nBundle come with custom form type, `<input type=\"text\"/>`, that provide elfinder"
},
{
"path": "docs/events-listeners-subscribers.md",
"chars": 3510,
"preview": "# Events listeners / subscribers\n\n## Events\n\nThe bundle is throwing some events during an elFinder command execution :\n-"
},
{
"path": "docs/flysystem.md",
"chars": 6045,
"preview": "Flysystem example configuration\r\n===============================\r\n\r\nYou will need library files to work with Flysystem:\r"
},
{
"path": "docs/summernote-integration.md",
"chars": 387,
"preview": "# Summernote integration\n\nUpdate the editor property in your app/config.yml\nSet Summernote editor type:\n\n```yaml\nfm_elfi"
},
{
"path": "docs/tinymce-integration.md",
"chars": 2013,
"preview": "# TinyMCE integration\n\nYou can integrate TinyMCE byself or use Bundles that already add TinyMCE functionality to your Sy"
},
{
"path": "phpunit.xml.dist",
"chars": 1224,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n bootstrap"
},
{
"path": "src/Bridge/ElFinderBridge.php",
"chars": 1501,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Bridge;\n\nuse elFinderVolumeDriver;\nuse FM\\ElfinderBundle\\ElFinder\\ElFinder;\nuse Symfo"
},
{
"path": "src/Command/ElFinderInstallerCommand.php",
"chars": 3265,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Command;\n\nuse ReflectionClass;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse"
},
{
"path": "src/Configuration/ElFinderConfigurationProviderInterface.php",
"chars": 167,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Configuration;\n\ninterface ElFinderConfigurationProviderInterface\n{\n public functio"
},
{
"path": "src/Configuration/ElFinderConfigurationReader.php",
"chars": 19664,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Configuration;\n\nuse Aws\\S3\\S3Client;\nuse Barracuda\\Copy\\API;\nuse Exception;\nuse FM\\El"
},
{
"path": "src/Connector/ElFinderConnector.php",
"chars": 2840,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Connector;\n\nuse elFinder;\n\nclass ElFinderConnector extends \\elFinderConnector\n{\n p"
},
{
"path": "src/Controller/ElFinderController.php",
"chars": 9742,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Controller;\n\nuse Exception;\nuse FM\\ElfinderBundle\\Event\\ElFinderPostExecutionEvent;\nu"
},
{
"path": "src/DependencyInjection/Compiler/ElFinderConfigurationPass.php",
"chars": 1490,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\DependencyInjection\\Compiler;\n\nuse const E_USER_DEPRECATED;\n\nuse Symfony\\Component\\De"
},
{
"path": "src/DependencyInjection/Compiler/TwigFormPass.php",
"chars": 628,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\DependencyInjection\\Compiler;\n\nuse Symfony\\Component\\DependencyInjection\\Compiler\\Com"
},
{
"path": "src/DependencyInjection/Configuration.php",
"chars": 32126,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition;"
},
{
"path": "src/DependencyInjection/FMElfinderExtension.php",
"chars": 1338,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\DependencyInjection;\n\nuse FM\\ElfinderBundle\\Controller\\ElFinderController;\nuse Symfon"
},
{
"path": "src/ElFinder/ElFinder.php",
"chars": 12470,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\ElFinder;\n\nuse elFinder as BaseElFinder;\nuse elFinderSession;\nuse elFinderSessionInte"
},
{
"path": "src/Event/ElFinderPostExecutionEvent.php",
"chars": 926,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Event;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpKerne"
},
{
"path": "src/Event/ElFinderPreExecutionEvent.php",
"chars": 2015,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Event;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpKerne"
},
{
"path": "src/FMElfinderBundle.php",
"chars": 567,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle;\n\nuse FM\\ElfinderBundle\\DependencyInjection\\Compiler\\ElFinderConfigurationPass;\nuse F"
},
{
"path": "src/Form/Type/ElFinderType.php",
"chars": 2079,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormB"
},
{
"path": "src/Loader/ElFinderLoader.php",
"chars": 3558,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Loader;\n\nuse Exception;\nuse FM\\ElfinderBundle\\Bridge\\ElFinderBridge;\nuse FM\\ElfinderB"
},
{
"path": "src/Loader/ElFinderLoaderInterface.php",
"chars": 928,
"preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace FM\\ElfinderBundle\\Loader;\n\nuse Exception;\nuse FM\\ElfinderBundle\\Configuration"
},
{
"path": "src/Resources/config/routing.yaml",
"chars": 480,
"preview": "ef_connect:\n path: /efconnect/{instance}/{homeFolder}\n defaults: { _controller: FM\\ElfinderBundle\\Controller\\ElFi"
},
{
"path": "src/Resources/public/tinymceElfinder.js",
"chars": 8552,
"preview": "window.tinymceElfinder = function(opts) {\n // elFinder node\n let elfNode = $('<div/>');\n if (opts.nodeId) {\n "
},
{
"path": "src/Resources/views/Elfinder/ckeditor.html.twig",
"chars": 5083,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/elfinder_type.html.twig",
"chars": 4609,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/fm_tinymce.html.twig",
"chars": 5047,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/helper/_summernote.html.twig",
"chars": 346,
"preview": "<script type=\"text/javascript\">\n function elFinderBrowser(){\n window.open(\n \"{{ url('elfind"
},
{
"path": "src/Resources/views/Elfinder/helper/_tinymce.html.twig",
"chars": 688,
"preview": "<script type=\"text/javascript\">\n //<![CDATA[\n function elFinderBrowser (field_name, url, type, win) {\n tiny"
},
{
"path": "src/Resources/views/Elfinder/helper/_tinymce4.html.twig",
"chars": 520,
"preview": "<script type=\"text/javascript\">\n function elFinderBrowser (field_name, url, type, win) {\n tinymce.activeEditor"
},
{
"path": "src/Resources/views/Elfinder/helper/_tinymce5.html.twig",
"chars": 276,
"preview": "<script type=\"text/javascript\">\n(function() {\n const mceElf = new tinymceElfinder({\n // connector URL (Use elF"
},
{
"path": "src/Resources/views/Elfinder/helper/main.js.twig",
"chars": 5603,
"preview": "(function(){\n \"use strict\";\n var // jQuery and jQueryUI version\n jqver = '3.3.1',\n uiver = '1.12.1',"
},
{
"path": "src/Resources/views/Elfinder/simple.html.twig",
"chars": 4185,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/summernote.html.twig",
"chars": 4877,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/tinymce.html.twig",
"chars": 5562,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Elfinder/tinymce4.html.twig",
"chars": 5109,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome="
},
{
"path": "src/Resources/views/Form/elfinder_widget.html.twig",
"chars": 1504,
"preview": "{% block elfinder_widget %}\n <input type=\"text\" {{ block('widget_attributes') }} {% if value is not empty %}value=\"{{"
},
{
"path": "src/Security/ElfinderSecurityInterface.php",
"chars": 347,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Security;\n\ninterface ElfinderSecurityInterface\n{\n /**\n * Array structure shoul"
},
{
"path": "src/Session/ElFinderSession.php",
"chars": 778,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Session;\n\nuse elFinderSessionInterface;\nuse Symfony\\Component\\HttpFoundation\\Session\\"
},
{
"path": "src/Twig/Extension/FMElfinderExtension.php",
"chars": 3374,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Twig\\Extension;\n\nuse Twig\\Environment;\nuse Twig\\Error\\LoaderError;\nuse Twig\\Error\\Run"
},
{
"path": "tests/Command/ElFinderInstallerCommandTest.php",
"chars": 3665,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Command;\n\nuse FM\\ElfinderBundle\\Command\\ElFinderInstallerCommand;\nuse PHPUnit\\F"
},
{
"path": "tests/Configuration/ElFinderConfigurationReaderTest.php",
"chars": 19369,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Configuration;\n\nuse FM\\ElfinderBundle\\Configuration\\ElFinderConfigurationReader"
},
{
"path": "tests/DependencyInjection/Compiler/TwigFormPassTest.php",
"chars": 797,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\DependencyInjection\\Compiler;\n\nuse FM\\ElfinderBundle\\DependencyInjection\\Compil"
},
{
"path": "tests/DependencyInjection/ConfigurationLoadTest.php",
"chars": 10322,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\DependencyInjection;\n\nuse FM\\ElfinderBundle\\DependencyInjection\\FMElfinderExten"
},
{
"path": "tests/DependencyInjection/FMElfinderExtensionTest.php",
"chars": 1870,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\DependencyInjection;\n\nuse FM\\ElfinderBundle\\DependencyInjection\\FMElfinderExten"
},
{
"path": "tests/Event/ElFinderPostExecutionEventTest.php",
"chars": 761,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Event;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse FM\\ElfinderBundle\\Eve"
},
{
"path": "tests/Event/ElFinderPreExecutionEventTest.php",
"chars": 1201,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Event;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse FM\\ElfinderBundle\\Eve"
},
{
"path": "tests/FMElfinderBundleTest.php",
"chars": 410,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests;\n\nuse FM\\ElfinderBundle\\FMElfinderBundle;\nuse Symfony\\Component\\DependencyInjec"
},
{
"path": "tests/Fixtures/config/config.php",
"chars": 2782,
"preview": "<?php\n\n$container->loadFromExtension('fm_elfinder', [\n 'configuration_provider' => 'app.configurator.custom',\n 'in"
},
{
"path": "tests/Fixtures/config/config.yml",
"chars": 1874,
"preview": "fm_elfinder:\r\n configuration_provider: app.configurator.custom\r\n instances:\r\n default:\r\n locale:"
},
{
"path": "tests/Form/Type/ElFinderTypeTest.php",
"chars": 1329,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Form\\Type;\n\nuse FM\\ElfinderBundle\\Form\\Type\\ElFinderType;\nuse Symfony\\Component"
},
{
"path": "tests/Functional/AppKernel.php",
"chars": 591,
"preview": "<?php\n\nuse Symfony\\Component\\HttpKernel\\Kernel;\nuse Symfony\\Component\\Config\\Loader\\LoaderInterface;\n\nclass AppKernel ex"
},
{
"path": "tests/Functional/config/config.yml",
"chars": 1248,
"preview": "framework:\n secret: \"thisismysecret\"\n router:\n resource: \"%kernel.root_dir%/config/routing.yaml\"\n "
},
{
"path": "tests/Functional/config/config_test.yml",
"chars": 160,
"preview": "imports:\n - { resource: config.yml }\n\nframework:\n test: ~\n session:\n storage_id: session.storage.mock_fi"
},
{
"path": "tests/Functional/config/routing.yml",
"chars": 99,
"preview": "# ElFinder file manager\nelfinder:\n resource: \"@FMElfinderBundle/Resources/config/routing.yaml\"\n\n"
},
{
"path": "tests/Loader/ElFinderLoaderTest.php",
"chars": 929,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Loader;\n\nuse FM\\ElfinderBundle\\Configuration\\ElFinderConfigurationProviderInter"
},
{
"path": "tests/Twig/Extension/FMElfinderExtensionTest.php",
"chars": 5533,
"preview": "<?php\n\nnamespace FM\\ElfinderBundle\\Tests\\Twig\\Extension;\n\nuse FM\\ElfinderBundle\\Twig\\Extension\\FMElfinderExtension;\nuse "
},
{
"path": "tests/autoload.php",
"chars": 55,
"preview": "<?php\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n"
},
{
"path": "tests/bootstrap.php",
"chars": 297,
"preview": "<?php\n\nuse Doctrine\\Common\\Annotations\\AnnotationRegistry;\n\nif (!file_exists($file = __DIR__.'/../vendor/autoload.php'))"
}
]
About this extraction
This page contains the full source code of the helios-ag/FMElfinderBundle GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 81 files (314.6 KB), approximately 70.8k tokens, and a symbol index with 162 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.