Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fm Elfinder Bundle Laravel Package

alxishin/fm-elfinder-bundle

View on GitHub
Deep Wiki
Context7

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":

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:

// ...
use FM\ElfinderBundle\Form\Type\ElFinderType;
// ...

$form = $this->createFormBuilder()
    ->add('elfinder', ElFinderType::class, ['instance' => 'form', 'enable' => true])
    ->getForm();

<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):

- { property: 'images', type: 'collection', label: 'Images', type_options: { allow_add: false, allow_delete: false, entry_type: 'FM\ElfinderBundle\Form\Type\ElFinderType' }}

and easyadmin.yaml

design:
    form_theme:
      - '[@EasyAdmin](https://github.com/EasyAdmin)/form/bootstrap_4.html.twig'
      - '[@FMElfinder](https://github.com/FMElfinder)/Form/elfinder_widget.html.twig'
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui