PHPackages                             oveleon/contao-config-driver-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. oveleon/contao-config-driver-bundle

ActiveContao-bundle

oveleon/contao-config-driver-bundle
===================================

Config Driver for Contao Open Source CMS

1.5.3(9mo ago)24.3k1MITPHPPHP ^8.1

Since Nov 19Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/oveleon/contao-config-driver-bundle)[ Packagist](https://packagist.org/packages/oveleon/contao-config-driver-bundle)[ Docs](https://www.oveleon.de/)[ RSS](/packages/oveleon-contao-config-driver-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (21)Used By (1)

Config Driver for Contao Open Source CMS
========================================

[](#config-driver-for-contao-open-source-cms)

This extension adds another driver to the Contao Open Source CMS.

With the Config-Driver it is possible to load fields from a configuration file and output them in the backend. The DCA structure used by Contao is kept. It can be decided whether the data is stored in the localconfig or in an existing database column.

Configuration files located on `ROOT` under `/templates/` are used. If no template is found, installed bundles are searched afterwards. This gives you the possibility to overwrite configuration files without discarding the default.

### Why?

[](#why)

In our case we need a DCA in which we have the possibility to store the fields in another database column to save database queries and performance.

Additionally we want to provide the possibility to deliver a standard configuration which can be extended via the backend. The driver was developed to deliver a basic theme and its SCSS variables from a bundle and let it be consumed or extended by another. For more information you can have a look at our bundle "[Contao ThemeManager](https://github.com/contao-thememanager/core)", in which the driver is used.

### Example for saving in localconfig:

[](#example-for-saving-in-localconfig)

For the storage in the `localconfig`, only two fields are needed.

#### Fields

[](#fields)

- `dataContainer`: The driver to be used
- `configFile`: The configuration file to be used (DCA Palette and Fields)

```
$GLOBALS['TL_DCA']['tl_newdca'] = array
(
    'config' => array
    (
        'dataContainer'               => 'Config',
        'configFile'                  => 'dcaConfigFile.html5' // Use the extension html5 to make the configuration extensible in the backend. If the configuration must not be changed, choose the extension PHP.
    )
);
```

### Example for saving in existing database table/column:

[](#example-for-saving-in-existing-database-tablecolumn)

For the storage in an existing database column, all fields of the configuration file are stored serialized.

#### Fields

[](#fields-1)

- `dataContainer`: The driver to be used
- `ptable`: The table in which the data is to be stored
- `configField`: The table column in which the data is stored serialized
- `configFile`: The configuration file to be used (DCA Palette and Fields)
- `multipleConfigFiles`: Merge all configFiles with same name

```
$GLOBALS['TL_DCA']['tl_newdca'] = array
(
    'config' => array
    (
        'dataContainer'               => 'Config',
        'ptable'                      => 'tl_theme',
        'configField'                 => 'configData',
        'configFile'                  => 'dcaConfigFile.html5',
        'multipleConfigFiles'         => true
    )
);
```

### Example of a configuration file

[](#example-of-a-configuration-file)

```
return array(
    'palettes' => array(                                    //
        'default'  => '{font_legend},fontsize,fontcolor'    // Optional
    ),                                                      //
    'fields'   => array(
        'fontsize' => array
        (
            'label'                   => &$GLOBALS['TL_LANG']['tl_newdca']['fontsize'],
            'inputType'               => 'inputUnit',
            'options'                 => $GLOBALS['TL_CSS_UNITS'],
            'eval'                    => array('includeBlankOption'=>true, 'rgxp'=>'digit_inherit', 'maxlength' => 20, 'tl_class'=>'w50'),
        ),
        'fontcolor' => array
        (
            'label'                   => &$GLOBALS['TL_LANG']['tl_newdca']['fontcolor'],
            'inputType'               => 'text',
            'eval'                    => array('maxlength'=>6, 'colorpicker'=>true, 'isHexColor'=>true, 'decodeEntities'=>true, 'tl_class'=>'w50 wizard'),
        )
    )
);
```

### Further Examples

[](#further-examples)

To continue the example from above and to be able to access the configuration in the backend via e.g. the theme, we can add another icon for each theme.

##### config/config.php

[](#configconfigphp)

```
$GLOBALS['BE_MOD']['design']['themes']['tables'][] = 'tl_newdca';
```

##### dca/tl\_theme.php

[](#dcatl_themephp)

```
// Add operation
$GLOBALS['TL_DCA']['tl_theme']['list']['operations']['newdca'] = array
(
    'label'               => &$GLOBALS['TL_LANG']['tl_theme']['newdca'],
    'href'                => 'table=tl_newdca',
    'icon'                => 'css.svg',
);

// Add fields
$GLOBALS['TL_DCA']['tl_theme']['fields']['configData'] = array
(
    'inputType'      => 'text',
    'sql'            => "text NULL"
);
```

Now we have the possibility to fill in all fields from the configuration for each theme and save each in its new database column.

##### Backend View

[](#backend-view)

[![Admin View: List](https://camo.githubusercontent.com/853a4e7dab6346d8ad08541017795f0db6f386aad4e3e3a90aee532581c5630b/68747470733a2f2f7777772e6f76656c656f6e2e64652f73686172652f6769746875622d6173736574732f636f6e74616f2d636f6e6669672d6472697665722d62756e646c652f636f6e6669672d6472697665722d6578616d706c652e706e67)](https://camo.githubusercontent.com/853a4e7dab6346d8ad08541017795f0db6f386aad4e3e3a90aee532581c5630b/68747470733a2f2f7777772e6f76656c656f6e2e64652f73686172652f6769746875622d6173736574732f636f6e74616f2d636f6e6669672d6472697665722d62756e646c652f636f6e6669672d6472697665722d6578616d706c652e706e67)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~110 days

Recently: every ~43 days

Total

20

Last Release

281d ago

Major Versions

0.1.2 → 1.0.02020-03-04

PHP version history (4 changes)0.1.0PHP ^5.6 || ^7.0

1.0.2PHP ^7.0 || ^8.0

1.1.0PHP ^8.0

1.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/acb45ab67207e71f4495c84d405e09a9de7ea11f7645c3de802d9abb3691efa0?d=identicon)[oveleon](/maintainers/oveleon)

![](https://www.gravatar.com/avatar/b01df75d47aa595ed295e64cfde15e5f17ea7b07458b71429ce40804c081d0a6?d=identicon)[Doi](/maintainers/Doi)

---

Top Contributors

[![zoglo](https://avatars.githubusercontent.com/u/55794780?v=4)](https://github.com/zoglo "zoglo (18 commits)")[![doishub](https://avatars.githubusercontent.com/u/48379929?v=4)](https://github.com/doishub "doishub (9 commits)")

---

Tags

configcontaocontao-bundledriverconfigdrivercontao

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/oveleon-contao-config-driver-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/oveleon-contao-config-driver-bundle/health.svg)](https://phpackages.com/packages/oveleon-contao-config-driver-bundle)
```

###  Alternatives

[contao-community-alliance/dc-general

Universal data container for Contao

1578.3k86](/packages/contao-community-alliance-dc-general)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3183.3k6](/packages/codefog-contao-news-categories)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3172.5k4](/packages/terminal42-contao-node)[terminal42/dcawizard

dcaWizard extension for Contao Open Source CMS

10370.7k15](/packages/terminal42-dcawizard)[terminal42/dc_multilingual

A multilingual DC driver storing the translations in the same table for Contao Open Source CMS

1787.2k14](/packages/terminal42-dc-multilingual)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
