Download the PHP package nowo-tech/dashboard-menu-bundle without Composer
On this page you can find all versions of the php package nowo-tech/dashboard-menu-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowo-tech/dashboard-menu-bundle
More information about nowo-tech/dashboard-menu-bundle
Files in nowo-tech/dashboard-menu-bundle
Package dashboard-menu-bundle
Short Description Symfony bundle for configurable dashboard menus with i18n (JSON translations), tree structure (parent/position), permissions, Twig and JSON API. No external ORM extensions.
License MIT
Homepage https://github.com/nowo-tech/DashboardMenuBundle
Informations about the package dashboard-menu-bundle
Nowo Dashboard Menu Bundle
⭐ Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.
Nowo Dashboard Menu Bundle — Configurable dashboard menus with i18n (JSON translations), tree structure (parent + position), permissions, Twig rendering and JSON API. No external ORM extensions (Gedmo/Stof). Minimum: PHP 8.2+, Symfony 7.4+ / 8 (^7.4 || ^8.0).
This bundle is FrankenPHP worker mode friendly.
Table of contents
- Features
- Installation
- Requirements
- Configuration
- Usage
- Demo
- Development
- Documentation
- Tests and coverage
- License
- Author
Features
- Menu & MenuItem entities: Tree (parent/children, ordered by position), labels with optional JSON translations per locale, optional icon per item (e.g. Symfony UX Icons)
- Context resolution: Same
codecan have multiple menus with different JSON context (e.g.partnerId,operatorId); pass an ordered list of context sets and the first match is used; empty context = fallback - Config: Doctrine connection and table prefix; cache (TTL + pool) for the menu tree;
icon_library_prefix_map(e.g.bootstrap-icons→bi); locales; per-menu options (classes, permission checker, depth limit, icons, collapsible) in the database - Permissions:
MenuPermissionCheckerInterface— implement and tag to filter items per user/context - Twig:
dashboard_menu_tree(menuCode, permissionContext?, contextSets?),dashboard_menu_href(item),dashboard_menu_config(menuCode, contextSets?); include@NowoDashboardMenuBundle/menu.html.twig - JSON API:
GET /api/menu/{code}for SPA consumption (optional_locale,_context_setsquery params) - Dashboard: CRUD at
/admin/menus(list, create, edit, copy menu, manage items); export/import menus as JSON; optional drag-and-drop tree reorder (SortableJS) on a dedicated route; forms split into definition (pencil) and configuration (gear); dashboard search/action flows use Symfony Form Types + FormKit-friendly Twig rendering (form_start/form_end); redirect to referer after successful actions; import available in a modal - Performance: Two SQL queries per menu (menu + items), optional PSR-6 cache (configurable TTL); labels by locale from JSON; tree built in PHP
- Dev: Web Profiler panel “Dashboard menus” (menus on page, query count, configuration tab: connection, cache, locales, icon map, permission checkers)
Installation
With Symfony Flex, the recipe (if available) registers the bundle and adds config/routes. Without Flex, see docs/INSTALLATION.md for manual steps.
Requirements
- PHP >= 8.2, < 8.6
- Symfony 7.4+ or 8.x (
^7.4 || ^8.0) — Symfony 7 floor is 7.4 (REQ-SF-001; FormKit^2.0) - Doctrine ORM ^2.13 || ^3.0 (no Gedmo/Stof required)
- UiKitBundle + FormKitBundle (required hard dependencies for the dashboard UI)
- Symfony UX Autocomplete & Live Component (installed with the bundle): 2.x (from 2.32 / 2.33) or 3.x
See docs/UPGRADING.md for compatibility notes.
Configuration
Menus are defined in the database (dashboard at /admin/menus or fixtures): code, name, context (optional JSON), CSS classes. In YAML you only need defaults (and optional project, locales). See docs/CONFIGURATION.md.
Usage
Twig:
With context sets (resolve which menu variant to show):
API: GET /api/menu/sidebar returns JSON tree with label, href, routeName, children. Optional query: _context_sets (JSON array of context objects).
Full details: docs/USAGE.md.
Demo
The in-repo demo is demo/symfony8 (FrankenPHP + Caddy; HTTP on port 80 in the container). The package still supports Symfony 7.4+ and 8 via Composer. Compose defaults to APP_ENV=dev and FRANKENPHP_MODE=worker; set FRANKENPHP_MODE=classic for hot-reload (Caddyfile.dev, no PHP worker) — docs/DEMO.md.
Default host port: 8011 via PORT in demo/symfony8/.env.
From bundle root:
Development
Run tests and QA with Docker: make up && make install && make test (or make test-coverage, make qa). Without Docker: composer install && composer test. Full details: docs/DEVELOPMENT.md.
Dashboard assets (TS → JS): Built with Vite (as in IconSelectorBundle). Sources under src/Resources/assets/src/ (dashboard.ts, stimulus-live.ts, logger.ts). Output: src/Resources/public/js/dashboard.js (IIFE) and js/stimulus-live.js (ESM), installed by Symfony to public/bundles/nowodashboardmenu/js/.
Then run php bin/console assets:install in the app so public/bundles/nowodashboardmenu/js/ is updated.
Documentation
- GitHub Actions CI requirements
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
-
GitHub Spec Kit
Additional documentation
- Demo with FrankenPHP (development and production)
- Demo
- Development
Tests and coverage
- Tests: PHPUnit (unit and integration suites) + Vitest for TypeScript (
make test-ts) - PHP (Lines): 99.27% on the includable
src/set — seedocs/COVERAGE.md. Runmake coverage-check/composer coverage-check. - TS/JS: 100% on
logger.ts(Vitest + v8); runmake test-ts(prints global TS coverage via.scripts/ts-coverage-percent.sh) - Python: N/A
License
The MIT License (MIT). Please see LICENSE for more information.
Author
Created by Héctor Franco Aceituno at Nowo.tech
All versions of dashboard-menu-bundle with dependencies
doctrine/orm Version ^2.13 || ^3.0
nowo-tech/form-kit-bundle Version ^2.0
nowo-tech/ui-kit-bundle Version ^1.4
php Version >=8.2 <8.6
psr/cache Version ^1.0 || ^2.0 || ^3.0
psr/clock Version ^1.0
psr/log Version ^1.0 || ^2 || ^3
symfony/asset Version ^7.4 || ^8.0
symfony/clock Version ^7.4 || ^8.0
symfony/config Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/form Version ^7.4 || ^8.0
symfony/framework-bundle Version ^7.4 || ^8.0
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/mime Version ^7.4 || ^8.0
symfony/routing Version ^7.4 || ^8.0
symfony/security-core Version ^7.4 || ^8.0
symfony/security-csrf Version ^7.4 || ^8.0
symfony/translation Version ^7.4 || ^8.0
symfony/twig-bundle Version ^7.4 || ^8.0
symfony/ux-autocomplete Version ^2.33 || ^3.0
symfony/ux-live-component Version ^2.32 || ^3.0
symfony/validator Version ^7.4 || ^8.0
twig/extra-bundle Version ^3.12
twig/string-extra Version ^3.12