• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    PHP
  • License
    GNU Lesser Genera...
  • Created over 10 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[READ-ONLY] Contao Core Bundle

Contao core bundle

Contao is an Open Source PHP Content Management System for people who want a professional website that is easy to maintain. Visit the project website for more information.

Contao has been designed as a Symfony bundle, which can be used to add CMS functionality to any Symfony application. If you do not have an existing Symfony application yet, we recommend using the Contao managed edition as basis for your application.

Prerequisites

The Contao core bundle has a recipe in the symfony/recipes-contrib repository. Be sure to either enable contrib recipes for your project by running the following command or follow the instructions to use the contrib recipe during the installation process.

composer config extra.symfony.allow-contrib true

Add the contao-component-dir to the extra section of your composer.json file.

composer config extra.contao-component-dir assets

Installation

Install Contao and all its dependencies by executing the following command:

composer require \
    contao/core-bundle:4.8.* \
    php-http/guzzle6-adapter:^1.1

Note that you can exchange the php-http/guzzle6-adapter package with any other HTTP client implementation. If you already have an HTTP client implementation, you can omit the package entirely.

Configuration

Configure the DATABASE_URL in your environment, either using environment variables or by using the Dotenv component.

Enable ESI in the config/packages/framework.yaml file.

framework:
    esi: true

Add the Contao routes to your config/routing.yaml file, and be sure to load the ContaoCoreBundle at the very end, so the catch-all route does not catch your application routes.

ContaoCoreBundle:
    resource: "@ContaoCoreBundle/config/routes.yaml"

Edit your config/security.yaml file and merge all the providers, encoders, firewalls and access_control sections:

security:
    password_hashers:
        Contao\User: auto

    providers:
        contao.security.backend_user_provider:
            id: contao.security.backend_user_provider

        contao.security.frontend_user_provider:
            id: contao.security.frontend_user_provider

    firewalls:
        contao_backend:
            request_matcher: contao.routing.backend_matcher
            provider: contao.security.backend_user_provider
            user_checker: contao.security.user_checker
            switch_user: true
            login_throttling: ~

            contao_login:
                remember_me: false

            logout:
                path: contao_backend_logout

        contao_frontend:
            request_matcher: contao.routing.frontend_matcher
            provider: contao.security.frontend_user_provider
            user_checker: contao.security.user_checker
            switch_user: false
            login_throttling: ~

            contao_login:
                remember_me: true

            remember_me:
                secret: '%kernel.secret%'
                remember_me_parameter: autologin
                service: contao.security.persistent_remember_me_handler

            logout:
                path: contao_frontend_logout

    access_control:
        - { path: ^%contao.backend.route_prefix%/login$, roles: PUBLIC_ACCESS }
        - { path: ^%contao.backend.route_prefix%/logout$, roles: PUBLIC_ACCESS }
        - { path: ^%contao.backend.route_prefix%(/|$), roles: ROLE_USER }
        - { path: ^/, roles: [PUBLIC_ACCESS] }

The Contao core-bundle is now installed and activated. Use the contao:migrate command to upgrade the database and the contao:user:create command to create your first back end user.

License

Contao is licensed under the terms of the LGPLv3.

Getting support

Visit the support page to learn about the available support options.

More Repositories

1

core

Contao 3 β†’ see contao/contao for Contao 4
PHP
492
star
2

contao

Contao Open Source CMS
PHP
341
star
3

contao-manager

Contao Manager
PHP
85
star
4

imagine-svg

Contao Imagine SVG Library
PHP
79
star
5

check

Contao Check
PHP
47
star
6

docs-archive

Contao Documentation
Makefile
43
star
7

standard-edition

[DEPRECATED] Do not use anymore!
PHP
33
star
8

docs

Contao Documentation
CSS
31
star
9

skeleton-bundle

Skeleton bundle for custom Contao 4 bundles
PHP
29
star
10

package-metadata

Contao Package Metadata
PHP
21
star
11

manager-bundle

[READ-ONLY] Contao Manager Bundle
PHP
17
star
12

official-demo

Contao Official Demo
SCSS
17
star
13

managed-edition

Contao Managed Edition
17
star
14

easy-coding-standard

EasyCodingStandard configurations for Contao
PHP
12
star
15

image

Contao Image Library
PHP
12
star
16

maker-bundle

[READ-ONLY] Contao Maker Bundle
PHP
12
star
17

news-bundle

[READ-ONLY] Contao News Bundle
PHP
9
star
18

installation-bundle

[READ-ONLY] Contao Installation Bundle
PHP
8
star
19

deployer-edition

Contao 4 deployer edition
PHP
7
star
20

test-case

[READ-ONLY] Contao Test Case
PHP
6
star
21

phpstan

[DEPRECATED] Do not use anymore!
PHP
5
star
22

calendar-bundle

[READ-ONLY] Contao Calendar Bundle
PHP
5
star
23

mobile-page-layout-bundle

Mobile page layout bundle for Contao 4
PHP
4
star
24

newsletter-bundle

[READ-ONLY] Contao Newsletter Bundle
PHP
4
star
25

to.contao.org

Contao Short Link Service (https://to.contao.org)
PHP
4
star
26

manager-plugin

Contao Manager Plugin
PHP
4
star
27

contao-demo

This is an example website for Contao, a powerful open source CMS that allows you to create professional websites and scalable web applications.
SCSS
3
star
28

conflicts

Contao Conflicting Packages
3
star
29

faq-bundle

[READ-ONLY] Contao FAQ Bundle
PHP
3
star
30

monorepo-tools

Build and split a monorepo (see contao/contao)
PHP
3
star
31

comments-bundle

[READ-ONLY] Contao Comments Bundle
PHP
2
star
32

listing-bundle

[READ-ONLY] Contao Listing Bundle
PHP
2
star
33

website

Issue tracker for contao.org
2
star
34

contao-rector

Rector rules for Contao
PHP
2
star
35

project

1
star
36

tcpdf-bundle

Article to PDF bundle for Contao 4
PHP
1
star
37

music-academy

[DEPRECATED] Do not use anymore!
CSS
1
star
38

package-indexer

See https://github.com/contao/package-metadata
PHP
1
star