Download the PHP package vivait/bootstrap-bundle without Composer
On this page you can find all versions of the php package vivait/bootstrap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bootstrap-bundle
BootstrapBundle
A set of common templates and utilities to assist in rapid application development in Symfony.
Installation
Using composer
Enabling bundle
Add the config rules
Add the following to your config.yml to enable Mopa Bootstrap integration:
Add the following to your config.yml to enable Mopa Bootstrap integration in to Assetic: Note: Bootstrap 3.1 and above use additional features in less which are incompatible with the LESS compiler, as such we have stripped them out until a solution can be found
You may already have an assetic configuration in your config,yml, if this is the case then you should combine the two, e.g.
Add the following to your config.yml to enable Viva Bootstrap form integration:
You may already have a twig configuration in your config,yml, if this is the case then you should combine the two, e.g.
You can change to be the title of your application, this will then appear in the title of each page.
Dumping the Assetic files
Updating composer.json
To make Mopa bootstrap bundle perform the symlink automatically on install, add the following to your composer.json: `
Enabling the search box
To enable the search box, you need to define the route to the search controller in your , e.g:
This will then pass the search query to your controller, via the GET parameter.
Using KNP Menus
Using composer
Enabling bundle
Adding menu items
To add menu items, you need to create an event listener that will listen to the event:
You'll then need to configure this event in your :
Using the list hydrator
Bootstrap bundle includes a custom Doctrine hydrator, based on this blog post.
This hydrator is pretty straightforward, it examines the columns returned in each row of the resultset, if there are only two columns, the first is assumed to be the key field (which would normally be the objects ID) and the second is assumed to be the value field. If there are more than two columns per row then the returned array will be an ID indexed array with each row consisting of an array of the remaining column values.
To enable use of the hydrator, add the following to your config.yml:
For use with Doctrine ORM 2.5+, use
and use when retrieving results from a query:
Using the user callable
At some point in your application, you may wish to inject the current user via the container. Bootstrap provides a helper class for this, based on this StackOverflow answer.
Simply inject , like in the following
Then when you need to reference the current user in your class, just call , as follows:
All versions of bootstrap-bundle with dependencies
mopa/bootstrap-bundle Version ~3.0
twbs/bootstrap Version v3.2.0
knplabs/knp-menu-bundle Version ~2.1
vivait/common Version ~2.2