# protung/easyadmin-plus-bundle architecture

> Architecture diagram of the GitHub repository protung/easyadmin-plus-bundle, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/protung/easyadmin-plus-bundle
- Repository: https://github.com/protung/easyadmin-plus-bundle

## Overview

##### Project type and purpose
- This is a Symfony “Bundle” library—an open-source plugin for EasyAdmin that provides additional fields, filters, form types, menus, routers, and CRUD controllers. It is not a standalone app but a reusable extension that you install via Composer into a Symfony project that already uses EasyAdmin.

##### File structure
- Top-level files: composer.json, package.json, docker- and GitHub workflows, README, Makefile, webpack.config.js.
- src/DependencyInjection: Bundle extension for loading services and configuration into the Symfony DI container.
- src/Controller: Base controllers and CRUD controllers that plug into the EasyAdmin routing.
- src/Field, src/Filter, src/Form, src/Menu, src/Orm, src/Router: Each folder implements one aspect of the EasyAdmin extension (fields, filters, form types, menu matching, repository paginators, URL generation).
- src/Resources: Public assets (JS/CSS), entrypoints/manifest, Twig views for CRUD pages.
- Tests in src/Test and in tests/ ensure each component behaves as expected.

##### README for additional insights

- Clear labels for each module/component (use the folder names, e.g., src/Field).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Symfony Core
    subgraph "Symfony Core"
        direction TB
        HTTPKernel["Symfony HTTP Kernel"]:::core
        Routing["Routing"]:::core
        EasyAdminCore["EasyAdmin Core Bundle"]:::core
    end

    %% ProtungEasyAdminPlusBundle
    subgraph "ProtungEasyAdminPlusBundle" 
        direction TB
        BundleMain["ProtungEasyAdminPlusBundle"]:::bundle
        DIExt["DependencyInjection Extension"]:::bundle
        ServiceContainer["Service Container"]:::bundle

        subgraph "Controllers" 
            direction TB
            BaseCtrl["BaseController"]:::bundle
            CrudCtrl["BaseCrudController"]:::bundle
            CrudDtoCtrl["BaseCrudDtoController"]:::bundle
            FlashHelper["Flash"]:::bundle
        end

        subgraph "Field Module"
            direction TB
            AdvField["AdvancedDisplayField"]:::bundle
            CallbackField["CallbackConfigurableField"]:::bundle
            EntityField["EntityField"]:::bundle
            JsonField["JsonField"]:::bundle
            subgraph "Configurators"
                direction TB
                CallbackConfigurableConfigurator["CallbackConfigurableConfigurator"]:::bundle
                PreConfigurator["CallbackConfigurableConfiguratorBeforeCommonPreConfigurator"]:::bundle
                PostConfigurator["CallbackConfigurableConfiguratorAfterCommonPostConfigurator"]:::bundle
                EntityConfiguratorField["EntityConfigurator"]:::bundle
                EntityMetadata["EntityMetadata"]:::bundle
            end
            DecoratorField["CallbackConfigurableField Decorator"]:::bundle
        end

        subgraph "Filter Module"
            direction TB
            EmbeddedTextFilter["EmbeddedTextFilter"]:::bundle
            EnumFilter["EnumFilter"]:::bundle
            EntityConfiguratorFilter["EntityConfigurator"]:::bundle
        end

        subgraph "Form Module"
            direction TB
            EntityFieldDataTransformer["EntityFieldDataTransformer"]:::bundle
            CrudAutocompleteType["CrudAutocompleteType"]:::bundle
            EntityFieldDoctrineType["EntityFieldDoctrineType"]:::bundle
            EntityTypeExtension["EntityTypeExtension"]:::bundle
        end

        subgraph "Menu Module"
            direction TB
            ChainMatcher["ChainMenuItemMatcher"]:::bundle
            MatcherBase["Matcher"]:::bundle
            StaticControllerMapper["StaticCurrentControllerMapper"]:::bundle
        end

        subgraph "ORM Module"
            direction TB
            EntityPaginator["EntityPaginator"]:::bundle
            EntityRepository["EntityRepository"]:::bundle
        end

        subgraph "Router Module"
            direction TB
            AdminUrlGen["AutocompleteActionAdminUrlGenerator"]:::bundle
        end

        subgraph "Resources"
            direction TB
            ServicesConfig["services.php"]:::bundle
            subgraph "Public Assets"
                direction TB
                AppCSS["app.css"]:::bundle
                AppJS["app.js"]:::bundle
                Entrypoints["entrypoints.json"]:::bundle
                Manifest["manifest.json"]:::bundle
            end
            subgraph "Twig Views"
                direction TB
                LayoutTwig["layout.html.twig"]:::bundle
                CrudIndexTwig["index.html.twig"]:::bundle
                EntityFieldTwig["entity.html.twig"]:::bundle
                JsonFieldTwig["json.html.twig"]:::bundle
            end
        end
    end

    %% External Dependencies
    subgraph "External"
        direction TB
        Browser["Browser (HTTP Client)"]:::external
        Doctrine["Doctrine ORM/Database"]:::external
        TwigEngine["Twig Engine"]:::external
        WebpackEncore["Asset Loader (Webpack Encore)"]:::external
    end

    %% Connections
    Browser -->|HTTP Request| HTTPKernel
    HTTPKernel --> Routing
    Routing --> EasyAdminCore
    EasyAdminCore -->|calls| BundleMain
    DIExt --> ServiceContainer
    BundleMain --> ServiceContainer
    ServiceContainer --> Controllers
    ServiceContainer --> FieldModule["Field Module"]
    ServiceContainer --> FilterModule["Filter Module"]
    ServiceContainer --> FormModule["Form Module"]
    ServiceContainer --> MenuModule["Menu Module"]
    ServiceContainer --> ORMModule["ORM Module"]
    ServiceContainer --> RouterModule["Router Module"]
    BaseCtrl -->|uses| FieldModule
    BaseCtrl -->|uses| FilterModule
    BaseCtrl -->|uses| FormModule
    BaseCtrl -->|uses| MenuModule
    BaseCtrl -->|uses| ORMModule
    BaseCtrl -->|uses| RouterModule
    BaseCtrl -->|render| TwigEngine
    CrudCtrl --> TwigEngine
    CrudDtoCtrl --> TwigEngine
    Controllers -->|DB Queries| Doctrine
    TwigEngine --> LayoutTwig
    TwigEngine --> CrudIndexTwig
    TwigEngine --> EntityFieldTwig
    TwigEngine --> JsonFieldTwig
    Controllers -->|serve assets| WebpackEncore

    %% Click Events
    click DIExt "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/DependencyInjection/ProtungEasyAdminPlusExtension.php"
    click BundleMain "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/ProtungEasyAdminPlusBundle.php"
    click BaseCtrl "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Controller/BaseController.php"
    click CrudCtrl "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Controller/BaseCrudController.php"
    click CrudDtoCtrl "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Controller/BaseCrudDtoController.php"
    click FlashHelper "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Controller/Flash.php"
    click AdvField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/AdvancedDisplayField.php"
    click CallbackField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/CallbackConfigurableField.php"
    click EntityField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/EntityField.php"
    click JsonField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/JsonField.php"
    click CallbackConfigurableConfigurator "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Configurator/CallbackConfigurableConfigurator.php"
    click PreConfigurator "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Configurator/CallbackConfigurableConfiguratorBeforeCommonPreConfigurator.php"
    click PostConfigurator "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Configurator/CallbackConfigurableConfiguratorAfterCommonPostConfigurator.php"
    click EntityConfiguratorField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Configurator/EntityConfigurator.php"
    click EntityMetadata "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Configurator/EntityConfigurator/EntityMetadata.php"
    click DecoratorField "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Field/Decorator/CallbackConfigurableField.php"
    click EmbeddedTextFilter "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Filter/EmbeddedTextFilter.php"
    click EnumFilter "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Filter/EnumFilter.php"
    click EntityConfiguratorFilter "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Filter/Configurator/EntityConfigurator.php"
    click EntityFieldDataTransformer "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Form/DataTransformer/EntityFieldDataTransformer.php"
    click CrudAutocompleteType "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Form/Type/CrudAutocompleteType.php"
    click EntityFieldDoctrineType "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Form/Type/EntityFieldDoctrineType.php"
    click EntityTypeExtension "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Form/Type/Extension/EntityTypeExtension.php"
    click ChainMatcher "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Menu/ChainMenuItemMatcher.php"
    click MatcherBase "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Menu/Matcher.php"
    click StaticControllerMapper "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Menu/Matcher/StaticCurrentControllerMapper.php"
    click EntityPaginator "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Orm/EntityPaginator.php"
    click EntityRepository "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Orm/EntityRepository.php"
    click AdminUrlGen "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Router/AutocompleteActionAdminUrlGenerator.php"
    click ServicesConfig "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/config/services.php"
    click AppCSS "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/public/app.css"
    click AppJS "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/public/app.js"
    click Entrypoints "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/public/entrypoints.json"
    click Manifest "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/public/manifest.json"
    click LayoutTwig "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/views/layout.html.twig"
    click CrudIndexTwig "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/views/crud/index.html.twig"
    click EntityFieldTwig "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/views/crud/field/entity.html.twig"
    click JsonFieldTwig "https://github.com/protung/easyadmin-plus-bundle/blob/main/src/Resources/views/crud/field/json.html.twig"

    %% Styles
    classDef core fill:#D0E6FF,stroke:#333,stroke-width:1px
    classDef bundle fill:#E6FFE6,stroke:#333,stroke-width:1px
    classDef external fill:#FFE0B2,stroke:#333,stroke-width:1px
```
