BraincraftedBootstrapBundle helps you integrate Bootstrap in your Symfony2 project. BootstrapBundle also supports the official Sass port of Bootstrap and Font Awesome.
Developed by Florian Eckerstorfer and amazing contributors.
First you need to add braincrafted/bootstrap-bundle to composer.json:
{
"require": {
"braincrafted/bootstrap-bundle": "dev-master"
}
}Please note that dev-master points to the latest release. If you want to use the latest development version please use dev-develop. Of course you can also use an explicit version number, e.g., 2.0.*.
You also have to add BraincraftedBootstrapBundle to your AppKernel.php:
// app/AppKernel.php
//...
class AppKernel extends Kernel
{
//...
public function registerBundles()
{
$bundles = array(
...
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle()
);
//...
return $bundles;
}
//...
}Additionally you have to install Bootstrap and jQuery as dependencies and configure Assetic to compile the LESS files. You can find more information in the Getting Started section of the documentation.
This bundle has two main dependencies, Symfony and Bootstrap. The following table shows which version of BraincraftedBootstrapBundle is compatible with which version of Symfony and Bootstrap.
| BootstrapBundle | Symfony | Bootstrap | jQuery |
|---|---|---|---|
| v1.3.* | v2.2.* | v2.3.* | v1.9.* |
| v1.4.* | v2.2.* | v2.3.* | v1.9.* |
| v1.5.* | v2.2.* | v2.3.* | v1.9.* |
| v2.0.* v2.1.* |
v2.3.* v2.4.* |
v3.0.* v3.1.* |
v1.10.* v1.11.* |
- #238 Add empty
valuefield whenempty_valueis not null in choice field - #239 Removed translation_domain from error messages
- #214 Check for
preSubmiterrors (by sandello-alkr) - #240 Include
headblock in default layout
- #203 Add support for
bootstrap-sass(by sandello-alkr and florianeckerstorfer) - #160 Add support for Font Awesome (by florianeckerstorfer)
- #229 Fix
bootstrap.jspath in default layout (by nonlux) - #221 Fix generated key for nested collections (by sandello-alkr)
- #220 Add option to configure icon prefix (by llwt)
- #206 Use
rawfilter for form labels (by sandello-alkr) - #209 Fixed compatibility issues with KnpMenu (by mbutkereit)
- #168 Removed CSS class
rowfrom form-group - #182 Added support for form actions (row with multiple buttons) (by rdohms)
- #187 Made default button class changable (by sandello-alkr)
- #188 Added icons to form buttons (by mvrhov)
- #190 Added support for stacked tabs (by aur1mas)
- #192 Added method to reset flash bag (by JulienRamel)
- #196 Removed CSS class
navfrom child elements (by dylanschoenmakers) - #198 Added parsing of icons in prepend and append input groups (by yvh)
- Fixed
fileform type (by hsz)
- Updated to Symfony v2.3.6
- Updated to Bootstrap v3.0.1
- Updated to jQuery v1.10.2
- Remove
include_responsiveoption because Bootstrap 3.0 no longer has a non responsive version - Added
boostrap_moneyform type that uses Bootstraps prepend or append style to display the currency percentform type uses Bootstraps append style to display the percent sign- Changed namespace back to
Braincrafted\Bundle\BootstrapBundle - Support for custom
variables.less - Several Twig filters are now functions
- Added
bootstrap_set_styleandbootstrap_get_styleTwig functions to globally set the style of forms - Added command to generate custom
bootstrap.lessfile - Added command to copy icon fonts into
web/directory - Added Composer script handler for copying icon fonts
- Pagination now supports disabled links
- Added Twig function
badge - Removed Twig filters
badge_*(Bootstrap v3.0 does not include multiply badge styles) - Twig filters
label_*are now Twig functions - Twig filter
iconis now a Twig function - Added
braincrafted_collectionform type
- Fixed compatibility with PHP 5.3 (Fixes #111)
- Renamed
braincrafted_collectiontobootstrap_collection widget_col,label_colandsimple_colcan be defined in form builder (Fixes #113)- Add support for input groups
- Fix bug with inline forms when no placeholder is defined
- Fixed configuration of input groups in form builder (Fixes #115)
- Fixed trailing slash in
braincrafted_bootstrap.output_diroption - Fixed undefined variable in pagination template
- Better tested
- Fixed duplicate
div.form-groupinchoice_widget_expanded(Fixes #131) - Use correct assets when not using LESS (Fixes #128) [amcgowanca]
- Add
col_sizeoption to set the column size for form widgets (Fixes #127) - Add support for
simple_coloptions intextarea_widget - Renamed views
- Add error messages in
checkbox_rowandradio_widget(Fixes #118)
- #133: Fix
label_col,widget_col,col_sizeandsimple_coloptions in collection widgets - #136: Added translation to
bootstrap_collectionwidget - #137: Removed
cssrewritefilter from default Assetic configuration - #139: Fix JavaScript for nested
bootstrap_collectionwidgets (by wizart) - #140: Improved dependency list in
composer.json(by hason) - #142: Added translation for help block and error messages
- #143: Added translation to flash message template (by rdohms)
- #144: Fix class attribute for checkbox widget (by squaye85)
- #145: Added possibility to style global error messages
- Renamed
customize_variablesconfiguration option intocustomize
- #152: Add form name attribute (by nonlux)
- #154: Fix Bootstrap Collection form type for nested types
- #155: Use
braincrafted_bootstrap.output_diroption when installing icon font - #52: Add class option for pagination
- #148: Add
label_colandwidget_coloption for the whole form (by florianeckerstorfer and dirkluijk) - #156: Add support for error messages with parameters (by thanosp)
- #157: Use print shiv instead of standard shiv (by mvrhov)
- #161: Set
styleoption in FormBuilder - #162: Set depth of navigation.
- Works with new Bootstrap repository
twbs/bootstrap - Basic support for Bootstrap v3.0
- Allow override options in menus
- Extend from base form layout
- Fixed problems with removing elemnts in JavaScript collection form type
- Various other bugfixes
- Changed namespace to
Bc\Bundle\BootstrapBundle - Automatically configure Twig
- Automatically configure KnpMenuBundle
- Automatically configure KnpPaginatorBundle
- Automatically configure Assetic
- Improved layout of error messages in compound fields
- Improved code style (usage of PHP_CodeSniffer and PHPMD)
- Support for
data-prototypeoption in collection fields - Helper and template for flash messages
- Added support for Assetic
- The bundle is licensed under the MIT License
- The CSS and Javascript from the Twitter Bootstrap are licensed under the Apache License 2.0





