Skip to content

jodermo/petzka-demo-bundle

Repository files navigation

GitHub Logo

Contao 4 - Demo Bundle

This demo is a basic Contao/Symfony Bundle
with examples for

• Backend Module
• Backend Widget
• Data Handling
• Content Element
• Frontend Module
• Frontend Widget
• Model
• Service

Add bundle as Git-Repository

add code to <contao root path>/composer.json

{
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/jodermo/petzka-demo-bundle.git"
        }
    ],
    "require": {
        "petzka/demo-bundle": "dev-master"
    },
    "config": {
        "preferred-install": {
            "petzka/*": "source",
            "*": "dist"
        }
    },
}

Add bundle as local repository

add code to <contao root path>/composer.json

{
    "...": "...",
    "repositories": [
        {
            "type": "path",
            "url": "repositories/petzka-demo-bundle"
        }
    ],
    "require": {
        "...": "...",
        "petzka/demo-bundle": "dev-master"
    },
    "config": {
        "preferred-install": {
            "petzka/*": "source",
            "*": "dist"
        }
    },
}

Customize

Customize this files:

.php_cs.php
composer.json
phpunit.xml.dist

Then rename all files and/or the references to DemoBundle in src/ and tests/:


How to work with Contao 4 and Troubleshooting
jodermo.github.io/contao-4-documentation/


For this bundle, I used some informations and stuff from this pages:

• Contao Hello World Bundle Tutorial:
gist.github.com/joergmoldenhauer/contao-hello-world-bundle-tutorial.md
• Contao 4 skeleton bundle:
github.com/contao/skeleton-bundle

Thanks, guys!