Download the PHP package heimrichhannot/contao-advanced-dashboard-bundle without Composer
On this page you can find all versions of the php package heimrichhannot/contao-advanced-dashboard-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-advanced-dashboard-bundle
More information about heimrichhannot/contao-advanced-dashboard-bundle
Files in heimrichhannot/contao-advanced-dashboard-bundle
Package contao-advanced-dashboard-bundle
Short Description A bundle to customize the contao backend dashboard.
License LGPL-3.0-or-later
Informations about the package contao-advanced-dashboard-bundle
Contao Advanced Dashboard Bundle
Customize the Contao back end dashboard and control which version-log entries are visible to back end users.
Features
- Replaces the Contao dashboard with an extensible native Twig template.
- Restricts version entries by user and database table.
- Provides events for filtering version entries and customizing version rows.
Requirements
- PHP
^8.4 - Contao
^5.7 - Symfony components
^7.4 - Doctrine DBAL
^3.7or^4.3
Installation
Install the bundle with Composer or the Contao Manager and then update the database:
Configure version rights
Add one or more versions_rights entries to the project configuration, usually in config/config.yaml:
Clear the application cache, then assign the new version right in the settings of a back end user or user group.
If no assigned configuration matches, the bundle uses the default configuration. Administrators are always unrestricted. An empty tables list means that all tables are allowed.
When multiple rights are assigned, their table lists are combined. An empty tables list makes the table selection unrestricted, and user_access_level: all takes precedence over self.
Customize the dashboard template
The dashboard uses Contao's native template hierarchy. Create [TWIG-ROOT]/be_advanced_dashboard.html.twig and extend the bundle template:
The following blocks are available:
dashboardmessagesshortcutsversionscredits
Override dashboard to change the complete layout. To add content to an existing section, override its block and call {{ parent() }} before or after the custom markup. Override a section with an empty block to hide it.
The old position and visibility variables and the Twig Support Bundle events are no longer supported. Version table columns are now defined by the versions block instead of the removed versions_rights.*.columns option.
Filter version entries
Use VersionListFilterEvent to customize the Doctrine DBAL query after the configured user and table restrictions have been applied:
The event provides the query builder and the active VersionListConfiguration. Use addSelect() to make additional tl_version columns available to VersionListRowEvent. The event is dispatched once for the count query and once for the result query, so listeners must apply deterministic changes to both queries. Use unique parameter names to avoid collisions with the built-in filters.
Customize version rows
Use VersionListRowEvent to modify each prepared version row:
The event receives the complete prepared tl_version row, including values such as date, username, shortTable, description and operations. Override the versions block if you need to render additional row values or table columns.
Configuration reference
All versions of contao-advanced-dashboard-bundle with dependencies
contao/core-bundle Version ^5.7
contao/manager-plugin Version ^2.0
doctrine/dbal Version ^3.7 || ^4.3
symfony/config Version ^7.4
symfony/dependency-injection Version ^7.4
symfony/event-dispatcher-contracts Version ^3.0
symfony/http-foundation Version ^7.4
symfony/http-kernel Version ^7.4
symfony/routing Version ^7.4
symfony/security-bundle Version ^7.4
symfony/security-core Version ^7.4
symfony/translation-contracts Version ^3.0
symfony/yaml Version ^7.4