2017 © Pedro Peláez
 

symfony-bundle bootstrap-bundle

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

image

rgou/bootstrap-bundle

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

  • Friday, November 1, 2013
  • by rafaelgou
  • Repository
  • 1 Watchers
  • 1 Stars
  • 40 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 36 Versions
  • 0 % Grown

The README.md

RgouBootstrapBundle

UnderConstruction: This bundle is alpha and has no release yet., (*1)

RgouBootstrapBundle is a twitter's bootstrap (http://twitter.github.com/bootstrap/) integrationinto your symfony2 (http://www.symfony.com) Project., (*2)

It includes a CRUD-generator based on SensioGeneratorBundle for Doctrine and Doctrine MongoDB ODM., (*3)

Is inspired and has borrowed some code from:, (*4)

Both are great jobs! I just want to merge some features in a more personal way., (*5)

Included Features

  • Basic layouts using CDN (from BootstrapCDN) or local assets
  • Local and CDN Bootswatch(http://bootswatch.com/) themes
  • A generic Navbar class to generate your Navbar outside the template
  • twig templates for KnpPaginatorBundle (https://github.com/knplabs/KnpPaginatorBundle) (from MopaBootstrapBundle)
  • twig template for KnpMenu (https://github.com/KnpLabs/KnpMenu)
  • CRUD Generation based on SensioGeneratorBundle with KnpPaginatorBundle support (just pagination for now, no sort) (from ToaTwitterBootstrapBundle](https://github.com/toaotc/ToaTwitterBootstrapBundle))
  • CRUD Generation for Doctrine MongoDB ODM (exclusive feature!) with KnpPaginatorBundle support (just pagination for now, no sort)

Basic Install

Add rgou/bootstrap-bundle to composer.json.

{
    "require": {
        // ...
        "rgou/bootstrap-bundle": "dev-master",
        // ...
    }
}

Register this bundle in the app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Rgou\BootstrapBundle\RgouBootstrapBundle(),
        // ...
    );
}

Public the assets

app/console assets:install --symlink

Prepare Assetic

Get YUI Compresor:, (*6)

cd /tmp
wget https://github.com/downloads/yui/yuicompressor/yuicompressor-2.4.7.zip
unzip yuicompressor-2.4.7.zip
mkdir /PAHT_TO_APPLICATION/app/Resources/java
cp /tmp/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar /PAHT_TO_APPLICATION/app/Resources/java/
rm -rf yuicompressor-2.4.7.zip yuicompressor-2.4.7

Configure Assetic in app/config/config.yml, (*7)

assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:
    - RgouBootstrapBundle
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        yui_css:
            jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar
        yui_js:
            jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar

Compile assets with assetic

app/console assetic:dump

Configure KnpPaginatorBundle

Add to app/config/config.yml:, (*8)

knp_paginator:
    page_range: 5                      # default page range used in pagination control
    default_options:
        page_name: page                # page query parameter name
        sort_field_name: sort          # sort field query parameter name
        sort_direction_name: direction # sort direction query parameter name
        distinct: true                 # ensure distinct results, useful when ORM queries are using GROUP BY statements
    template:
        pagination: KnpPaginatorBundle:Pagination:twitter_bootstrap_pagination.html.twig     # sliding pagination controls template
        sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig # sort link template

Configure KnpMenuBundle

Add to app/config/config.yml:, (*9)

knp_menu:
    twig:  
        template: RgouBootstrapBundle:Menu:knp_menu.html.twig
    templating: false
    default_renderer: twig

Avoiding Twig error messages

You can get in DEV mode the following twig error message:, (*10)

Variable "container_class" does not exist in RgouBootstrapBundle::base.html.twig at line 13

This happens because of strict_variables environment configurations defined to true on DEV., (*11)

To avoid this, search bellow in app\config\config.yml`, (*12)

twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%

and change to:, (*13)

twig:
    debug:            %kernel.debug%
    strict_variables: fals

See more: Twig - Environment Options, (*14)

Usage

See Doc Index for full usage documentation, (*15)

The Versions

01/07 2013

v0.7.6

0.7.6.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

10/05 2013

v0.7.3

0.7.3.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

09/05 2013

v0.7.2

0.7.2.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

09/05 2013

v0.7.1

0.7.1.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Bootstrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

09/05 2013

v0.7.0

0.7.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Bootstrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

08/05 2013

v0.6.1

0.6.1.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bootstrap bundle symfony theme twitter

08/05 2013

v0.6.0

0.6.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

08/05 2013

v0.5.0

0.5.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

07/05 2013

v0.4.1

0.4.1.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

07/05 2013

v0.4.0

0.4.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

07/05 2013

v0.3.0

0.3.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

06/05 2013

v0.2.0

0.2.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

27/03 2013

v0.1.5

0.1.5.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

27/03 2013

v0.1.4

0.1.4.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony theme twitter boostrap

21/03 2013

v0.1.3

0.1.3.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

bundle symfony theme twitter boostrap

20/03 2013

v0.1.2

0.1.2.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

bundle symfony theme twitter boostrap

20/03 2013

v0.1.0

0.1.0.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

bundle symfony theme twitter boostrap

20/03 2013

v0.1.1

0.1.1.0 http://github.com/rafaelgou/RgouBoostrapBundle

Twitter Boostrap Bundle for Symfony 2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

bundle symfony theme twitter boostrap