mopa / bootstrap-bundle
Easy integration of twitters bootstrap into symfony2
Installs: 2 694 228
Dependents: 44
Suggesters: 7
Security: 0
Stars: 709
Watchers: 39
Forks: 348
Open Issues: 28
Type:symfony-bundle
Requires
- php: ^7.2 || ^8.0
- mopa/composer-bridge: ^1.3
- symfony/console: ^4.4 || ^5.1 || ^6.0 || ^7.0
- symfony/form: ^4.4 || ^5.1 || ^6.0 || ^7.0
- symfony/framework-bundle: ^4.4 || ^5.1 || ^6.0 || ^7.0
- symfony/twig-bundle: ^4.4 || ^5.1 || ^6.0 || ^7.0
- twig/twig: ^2.9 || ^3.0
Requires (Dev)
- phpunit/phpunit: ^8.5 || ^9.4
- symfony/security-bundle: ^4.4 || ^5.1 || ^6.0 || ^7.0
- symfony/translation-contracts: ^2.0
Suggests
- craue/formflow-bundle: ~2.0
- knplabs/knp-menu-bundle: ~3.0
- knplabs/knp-paginator-bundle: ~2.3
- mopa/bootstrap-sandbox-bundle: ~2.3
- twbs/bootstrap: >2.0,<4.0-dev
- twbs/bootstrap-sass: v3.1.1
- dev-master / 3.x-dev
- v3.5.0
- v3.4.2
- v3.4.1
- v3.4.0
- 3.3.x-dev
- v3.3.1
- v3.3.0
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.1
- v3.0.0
- v3.0.0-RC2
- v3.0.0-RC1
- v3.0.0-beta4
- v3.0.0-beta3
- v3.0.0-beta2
- v3.0.0-beta1
- v2.3.x-dev
- v2.3.1
- v2.3.0
- 2.2.x-dev
- v2.2.0
- v2.2.0-alpha1
- 2.1.x-dev
- v2.1.0-alpha1
- 2.0.x-dev
- 1.x-dev
- 0.5
- dev-feature/travis
- dev-feature/insight
- dev-feature/inline-btn-disable
- dev-scrutinizer-patch-1
This package is auto-updated.
Last update: 2024-12-05 15:14:54 UTC
README
MopaBootstrapBundle is a collection of code to integrate twitter's bootstrap (http://twitter.github.com/bootstrap/) as easy as possible into your symfony (http://www.symfony.com) Project.
To use MopaBootstrapBundle and Twitter's Bootstrap 3 in your project add it via composer
Versions and dependencies
Updates
New in 3.1: The way horizontal
works has been slightly altered due to a change in Symfony forms. This may or may
not affect some behavior of your existing forms. ALL root form elements, whether they have a parent form or not will
start with horizontal
=== true
(or whatever value you set in the config). For the most part this shouldn't affect many users.
horizontal
will also correctly pass itself down to collection types (and all child forms). So if your collection is horizontal,
so will the collection items. If you want your collection items only to be inline, then you can pass these options to your collection:
array( 'entry_options' => array('horizontal' => false), // 2.8+ 'options' => array('horizontal' => false), // < 2.8 )
horizontal_wrap_children
has been removed, as this can be solved using the above options.
Branches
To use this bundle with bootstrap 3 use the latest release:
composer require mopa/bootstrap-bundle twbs/bootstrap
Or config via composer.json
For LESS:
{ "require": { "mopa/bootstrap-bundle": "~3.0", "twbs/bootstrap": "~3.3.0" } }
For SASS:
{ "require": { "mopa/bootstrap-bundle": "~3.0", "twbs/bootstrap-sass": "~3.3.0" } }
If you wish to use the current master branch, then use the following:
composer require mopa/bootstrap-bundle:dev-master twbs/bootstrap:dev-master
For bootstrap 2 use the v2.3.x branch:
composer require mopa/bootstrap-bundle:2.3.x-dev twbs/bootstrap:2.3.2
To understand which versions are currently required have a look into BRANCHES.md
Documentation
The bulk of the documentation is stored in the Resources/doc folder in this bundle In any case, if something is not working as expected after a update:
Live Show
To see the bundle, its capabilities and some more doc just have a look on
Additional Resources:
- MopaBootstrapSandboxBundle - Seperate live docs from code
- symfony-bootstrap is also available
Installation
Installation instructions are located in the
Included Features
- Bootstrap Version detection via Composer Bridge
- Twig Extensions and templates for use with symfony2 Form component
- control your form either via the form builder or the template engine
- control nearly every bootstrap2 form feature
- javascript and twig blocks for dynamic collections
- A generic Navbar class to generate your Navbar outside the template
- helpers for dropdowns, seperators, etc.
- A generic Tab class to Manage bootstrap tabbing
- Twig templates for KnpPaginatorBundle (https://github.com/knplabs/KnpPaginatorBundle)
- Twig templates for CraueFormFlowBundle (https://github.com/craue/CraueFormFlowBundle)
- Twig template for KnpMenuBundle (https://github.com/KnpLabs/KnpMenuBundle)
- icon support on menu links
Translations
If you use KnpPaginatorBundle with MopaBootstrapBundle, you can translate labels to your language. To do this add new file
Resources/translations/pagination.[YOUR LOCALE CODE].yml
As example you have there Polish translation.
Versioning
We aim to follow semantic versioning with our releases.
Contribute
If you want to contribute your code to MopaBootstrapBundle please be sure that your PR's are valid to Symfony2.1 Coding Standards. You can automatically fix your code for that with PHP-CS-Fixer tool.
You can see who already contributed to this project on Contributors page
License
This bundle is under the MIT license. For more information, see the complete LICENSE file in the bundle.