Download the PHP package terminal42/dcawizard without Composer
On this page you can find all versions of the php package terminal42/dcawizard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download terminal42/dcawizard
More information about terminal42/dcawizard
Files in terminal42/dcawizard
Package dcawizard
Short Description dcaWizard extension for Contao Open Source CMS
License LGPL-3.0+
Informations about the package dcawizard
dcawizard Contao Extension
A backend widget for Contao that allows editors to manage records from a foreign database table directly within the parent record's edit form.
Installation
Install via Composer:
Basic Usage (DCA Example)
Supporting both versions simultaneously
If your project needs to support both Contao 5.6 and 5.7+, you can allow both major
versions using a version union constraint in your composer.json:
Composer will then automatically install:
3.xwhen the project uses Contao ≤ 5.64.xwhen the project uses Contao ≥ 5.7
No code changes are needed on your end — the correct version will be resolved
based on the Contao version constraint in your own composer.json.
If you want to support both 3.x and 4.x simultaneously with a custom template,
you need to set customTpl dynamically at runtime rather than statically in the DCA,
since the template name changed between versions. For example, you can use an attributes callback
to detect the installed version and return the correct template name:
Migrating from 3.x to 4.x
The 4.x release is largely backwards compatible.
The list_callback option has been removed. To customize the record list rendering, override the {% block record %}
block in a custom template that extends the default one:
Then reference your template via customTpl:
The default template name has also been renamed. If you have overridden it in your project, update it accordingly:
| Version 3.x (.html5) | Version 4.x (.html.twig) |
|---|---|
be_widget_dcawizard |
backend/widget/dcawizard_custom |
Configuration Reference
Top-level DCA Options
These options are set directly on the field definition, outside of eval.
Foreign Table Options
| Option | Type | Default | Description |
|---|---|---|---|
foreignTable |
string |
- | The foreign database table to manage records from. |
foreignField |
string |
'pid' |
The foreign key field linking child records to the parent (e.g. fid). |
foreignTable_callback |
array |
- | Callback to dynamically determine the foreign table name. |
URL Params Options
| Option | Type | Default | Description |
|---|---|---|---|
params |
array |
[] |
Additional URL parameters added to the popup link (e.g. do, custom filter fields). |
eval Options
These options are set inside the eval array of the field definition.
Display Options
| Option | Type | Default | Description |
|---|---|---|---|
fields |
string[] |
- | Fields to display as columns in the record list. |
headerFields |
string[] |
[] |
Custom column header labels. Leave empty to use field labels. |
orderField |
string |
- | Field (and direction) used to order records (e.g. name DESC). |
emptyLabel |
string |
- | Label displayed when no child records exist. |
Button Options
| Option | Type | Default | Description |
|---|---|---|---|
editButtonLabel |
string |
- | Custom label for the edit/open popup button. |
hideButton |
bool |
false |
Hides the popup button (record list display only). |
Operations Options
| Option | Type | Default | Description |
|---|---|---|---|
showOperations |
bool |
false |
Displays per-row operation buttons (edit, delete, etc.). |
operations |
string[] |
all | Limits which row operations are shown. Defaults to all available. |
global_operations |
string[] |
[] |
Global operations added above the list (e.g. ['new']). |
Template Options
| Option | Type | Default | Description |
|---|---|---|---|
customTpl |
string |
be_widget_dcawizard |
Custom backend widget template name. |
Full Configuration Example
Usage with DC_Multilingual
If the foreign table is managed by DC_Multilingual, use the dedicated input type to exclude translated duplicate entries from the list:
If your setup uses a custom column name instead of the default language column (see langColumn in DC_Multilingual), specify it in the eval section:
Best Practices
- Use
foreignFieldwhen the linking column is not the defaultpid. - Use
foreignTable_callbackfor dynamic table resolution (e.g. based on parent record type). - Use
paramsto pre-filter the child record list via URL parameters. - Provide
headerFieldsmatching the count offieldsfor clarity. - Enable
showOperationsonly when inline editing of individual rows is needed.
All versions of dcawizard with dependencies
ext-json Version *
contao/core-bundle Version ^5.7
codefog/contao-haste Version ^5.3
doctrine/dbal Version ^3.7 || ^4.3
symfony/config Version ^7.4
symfony/dependency-injection Version ^7.4
symfony/http-foundation Version ^7.4
symfony/http-kernel Version ^7.4
symfony/routing Version ^7.4
symfony/asset Version ^7.4