FOSUserBundle integration for Symfony2Admingenerator.

v2.0-beta.6 2015-05-10 21:17 UTC

This package is auto-updated.

Last update: 2024-11-24 04:06:14 UTC


README

KnpBundles Badge

This package is a part of the Symfony2 Admin Generator based on YAML configuration and Twig templating.

It will allow you to associate to the FOSUserBundle a base layout configured throw a config in the config.yml

Follow us on Twitter!

Don't miss any updates from Symfony2 Admin Generator! Join Twitter today and follow us!

How to setup

Download files

Add Admingenerator to your composer.json:

"require": {
    "symfony2admingenerator/user-bundle": "dev-master"
},

Then run php composer.phar update command.

Note: This repository is compatible with symfony2admingenerator/GeneratorBundle.

Setup the FOSUserBundle

Follow the bundle documentation : https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md

Enable the bundle in AppKernel

 $bundles = array(
    // ....
    new Admingenerator\UserBundle\AdmingeneratorUserBundle(),

Configure the base layout to use for the login form

In config.yml

admingenerator_user:
     login_template: AdmingeneratorGeneratorBundle::base_admin.html.twig

Use the twig extension in your projects :

{% extends_my_configured_layout 'admingenerator.user_login_template' %}

Will be the same as :

{% extends 'The value of the container paramater admingenerator.user_login_template' %}