sonata_user.yml 2.29 KB
Newer Older
Antonin's avatar
Antonin committed
1 2 3
#
# more information can be found here http://sonata-project.org/bundles/user
#
Antonin's avatar
Antonin committed
4 5 6 7

parameters:
    sonata.user.profile.form.type.class:  Application\Sonata\UserBundle\Form\Type\ProfileType

Antonin's avatar
Antonin committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
# Enable Doctrine to map the provided entities
doctrine:
    orm:
        entity_managers:
            default:
                mappings:
                    FOSUserBundle: ~
                    ApplicationSonataUserBundle: ~
                    SonataUserBundle: ~

# if you change the class configuration, please also alter the fos_user.yml file
sonata_user:
    security_acl:             false
    table:
        user_group:           fos_user_user_group

    impersonating:
        route:                page_slug
        parameters:           { path: / }

    google_authenticator:
        server:               %sonata_user.google_authenticator.server%
        enabled:              true

    manager_type:             orm

    profile:
        dashboard:
            blocks:
Antonin's avatar
Antonin committed
37
                - { position: left, type: sonata.block.service.text, settings: { content: "<h2>Bienvenue !</h2> <p>Le tableau de bord est un peu vide pour l'instant, mais il se remplira bientôt !</p>"} }
Antonin's avatar
Antonin committed
38
                - { position: right, type: sonata.timeline.block.timeline, settings: { max_per_page: 15 }}
Antonin's avatar
Antonin committed
39 40
                - { position: left, type: sonata.news.block.recent_posts, settings: { title: News Récentes, number: 5, mode: public }}
                - { position: left, type: sonata.news.block.recent_comments, settings: { title: Commentaires Récents, number: 5, mode: public }}
Antonin's avatar
Antonin committed
41 42 43 44 45 46 47 48 49 50 51
        menu:
            - { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'}
            - { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'}
        form:
            type:                 sonata_user_profile
            handler:              sonata.user.profile.form.handler.default
            name:                 sonata_user_profile_form
            validation_groups:
                # Defaults:
                - Profile
                - Default
Antonin's avatar
Antonin committed
52 53 54 55 56 57 58

services:
    sonata.user.profile.form.type:
        class: Application\Sonata\UserBundle\Form\Type\ProfileType
        tags:
            - { name: form.type, alias: sonata_user_profile }
        arguments: [%fos_user.model.user.class%]