apnet / bootstrap
This package is abandoned and no longer maintained.
No replacement package was suggested.
Bootstrap for AsseticImporter
3.3.4.1
2016-07-08 15:21 UTC
Requires
- php: >=5.3.0
- apnet/assetic-importer-bundle: ~1.4
Requires (Dev)
- apnet/coding-standard: ~2.0
- apnet/functional-test-bundle: ~1.2
- apnet/jquery: ~2.2
- covex-nn/twig-callable-bridge-bundle: ~1.1
- knplabs/knp-markdown-bundle: ~1.3
- phpunit/phpunit: ~4.0
- symfony/monolog-bundle: ~2.3
- symfony/symfony: ~2.3|~3.0
This package is not auto-updated.
Last update: 2022-02-01 12:34:24 UTC
README
Installation
Add requirements to composer.json:
{ "require" : { "apnet/bootstrap" : "~3.1,<4.0" } }
Configurations
Register ApnetAsseticImporterBundle
bundle in the AppKernel.php
file
// ...other bundles ... $bundles[] = new Apnet\AsseticImporterBundle\ApnetAsseticImporterBundle();
Add Bootstrap importer to services.yml
services: # bootstrap3 default css apnet.assetic.importer.bootstrap_css: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/bootstrap/app/Resources/assets/stylesheets - bootstrap tags: - { name: apnet.assetic.config_mapper } # bootstrap3 js apnet.assetic.importer.bootstrap_js: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/bootstrap/app/Resources/assets/javascripts - bootstrap tags: - { name: apnet.assetic.config_mapper }
Twig
To include Bootstrap into Twig template use imported_asset function:
<link href="{{ imported_asset('bootstrap/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
and
<script type="text/javascript" src="{{ imported_asset('bootstrap/bootstrap.min.js') }}"></script>