PHPackages                             rgou/bootstrap-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. rgou/bootstrap-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

rgou/bootstrap-bundle
=====================

Twitter Bootstrap Symfony2 bundle with generator for Doctrine ORM and ODM

v0.9.6(12y ago)152MITCSSPHP &gt;=5.3.2

Since Mar 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rafaelgou/RgouBootstrapBundle)[ Packagist](https://packagist.org/packages/rgou/bootstrap-bundle)[ Docs](http://github.com/rafaelgou/RgouBoostrapBundle)[ RSS](/packages/rgou-bootstrap-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (36)Used By (0)

RgouBootstrapBundle
===================

[](#rgoubootstrapbundle)

*UnderConstruction*: This bundle is alpha and has no release yet.

RgouBootstrapBundle is a twitter's bootstrap () integrationinto your symfony2 () Project.

It includes a CRUD-generator based on [SensioGeneratorBundle](https://github.com/sensio/SensioGeneratorBundle)for Doctrine and Doctrine MongoDB ODM.

Is inspired and has borrowed some code from:

- [MopaBootstrapBundle](https://github.com/phiamo/MopaBootstrapBundle)
- [ToaTwitterBootstrapBundle](https://github.com/toaotc/ToaTwitterBootstrapBundle)

Both are great jobs! I just want to merge some features in a more personal way.

Included Features
-----------------

[](#included-features)

- Basic layouts using CDN (from [BootstrapCDN](http://www.bootstrapcdn.com/)) or local assets
- Local and CDN Bootswatch() themes
- A generic Navbar class to generate your Navbar outside the template
    - helpers for dropdowns, separators, etc. (from [MopaBootstrapBundle](https://github.com/phiamo/MopaBootstrapBundle))
- twig templates for KnpPaginatorBundle () (from [MopaBootstrapBundle](https://github.com/phiamo/MopaBootstrapBundle))
- twig template for KnpMenu ()
    - icon support on menu links (from [MopaBootstrapBundle](https://github.com/phiamo/MopaBootstrapBundle)and [Niels Mouthaan KnpMenu + Twitter Bootstrap GIST](https://gist.github.com/nielsmouthaan/3765766))
- CRUD Generation based on [SensioGeneratorBundle](https://github.com/sensio/SensioGeneratorBundle)with KnpPaginatorBundle support (just pagination for now, no sort) (from ToaTwitterBootstrapBundle\]())
- CRUD Generation for Doctrine MongoDB ODM (exclusive feature!) with KnpPaginatorBundle support (just pagination for now, no sort)

Basic Install
-------------

[](#basic-install)

### Add `rgou/bootstrap-bundle` to `composer.json`.

[](#add-rgoubootstrap-bundle-to-composerjson)

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

```

### Register this bundle in the `app/AppKernel.php`

[](#register-this-bundle-in-the-appappkernelphp)

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

```

### Public the assets

[](#public-the-assets)

```
app/console assets:install --symlink

```

### Prepare Assetic

[](#prepare-assetic)

Get YUI Compresor:

```
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

```
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

[](#compile-assets-with-assetic)

```
app/console assetic:dump

```

### Configure KnpPaginatorBundle

[](#configure-knppaginatorbundle)

Add to `app/config/config.yml`:

```
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
-----------------------

[](#configure-knpmenubundle)

Add to `app/config/config.yml`:

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

```

Avoiding Twig error messages
----------------------------

[](#avoiding-twig-error-messages)

You can get in DEV mode the following twig error message:

```
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.

To avoid this, search bellow in app\\config\\config.yml`

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

```

and change to:

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

```

See more: [Twig - Environment Options](http://twig.sensiolabs.org/doc/api.html#environment-optionswig)

Usage
-----

[](#usage)

See [Doc Index](Resources/doc/index.md) for full usage documentation

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

35

Last Release

4671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8eb8758272ee57857c2cbe537ffac314b02fa99e0b8c7a75571a688b7dbcf6e?d=identicon)[rafaelgou](/maintainers/rafaelgou)

---

Top Contributors

[![rafaelgou](https://avatars.githubusercontent.com/u/196133?v=4)](https://github.com/rafaelgou "rafaelgou (14 commits)")

---

Tags

symfonybundletwitterthemebootstrap

### Embed Badge

![Health badge](/badges/rgou-bootstrap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rgou-bootstrap-bundle/health.svg)](https://phpackages.com/packages/rgou-bootstrap-bundle)
```

###  Alternatives

[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9626.1k68](/packages/open-dxp-opendxp)[nytodev/inertia-bundle

Symfony Bundle implementing the Inertia.js v3 server-side protocol

181.4k](/packages/nytodev-inertia-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
