Download the PHP package symkit/faq-bundle without Composer
On this page you can find all versions of the php package symkit/faq-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symkit/faq-bundle
More information about symkit/faq-bundle
Files in symkit/faq-bundle
Package faq-bundle
Short Description A flexible and modular FAQ (Frequently Asked Questions) management bundle for Symfony applications.
License MIT
Informations about the package faq-bundle
FAQ Bundle
A flexible and modular FAQ (Frequently Asked Questions) management bundle for Symfony applications. It provides a configurable administration interface (CRUD), public rendering with Stimulus accordion, and automatic position management for FAQ items.
Requirements
- PHP 8.2+
- Symfony 7.0 or 8.0
- Doctrine ORM
- symkit/form-bundle
- symkit/crud-bundle
Installation
1. Require via Composer
2. Enable the bundle
Register the bundle in config/bundles.php:
3. Update database schema
Configuration
All features can be enabled or disabled via the bundle configuration. Create or edit config/packages/symkit_faq.yaml:
If you use custom entity or repository classes (e.g. extending the defaults), configure them here and ensure your Doctrine mapping covers the same tables or your overrides.
Routes
Import the bundle routes in your application config/routes.yaml.
Configurable prefixes (recommended; uses admin.route_prefix and public.route_prefix from config):
Fixed paths (/admin, /faq):
This registers:
- Admin:
/admin/faqs(list, create, edit, delete),/admin/faqs/{faqId}/items/create,/admin/faq-items/{id}/edit,/admin/faq-items/{id}/delete - Public:
/faq/{code}(show FAQ by code)
You can wrap the import with a custom prefix if you need to change the URL prefix.
Translations
The bundle provides XLIFF translations in SymkitFaqBundle (and validators for constraint messages) in English and French. Translations are auto-discovered from the bundle translations/ directory.
To override or add locales, place your files in your app’s translations/ directory with the same domain names (SymkitFaqBundle.*.xlf, validators.*.xlf).
Usage
Displaying a FAQ in Twig
Render a FAQ block by code (e.g. from a controller that loaded the entity):
Admin interface
The admin CRUD is available at /admin/faqs (or your configured prefix). It uses symkit/crud-bundle for lists, forms, and actions.
Customizing templates
Override bundle templates under your project:
Copy the relevant Twig files from vendor/symkit/faq-bundle/templates/faq/ and edit them.
Assets and Stimulus
The bundle registers its Stimulus controller via AssetMapper. Ensure your app uses AssetMapper and that the faq controller is loaded (e.g. in your importmap.php and Stimulus app registration). The accordion uses data-controller="faq" and data-action="faq#toggle".
Components
- Entities:
Faq(group of questions),FaqItem(question/answer with position). - Stimulus:
faqcontroller for accordion toggle behaviour.
Dependencies
- doctrine/doctrine-bundle — ORM integration
- doctrine/orm — Entity persistence
- symfony/validator — Validation
- symkit/form-bundle — FormSectionType, SlugType, form theme
- symkit/crud-bundle — CRUD and list UI
License
MIT.
All versions of faq-bundle with dependencies
doctrine/doctrine-bundle Version ^2.11 || ^3.0
doctrine/orm Version ^3.6
symfony/framework-bundle Version ^7.0 || ^8.0
symfony/validator Version ^7.0 || ^8.0
symkit/crud-bundle Version ~0.0.1
symkit/form-bundle Version ~0.0.1