ekyna / fontawesome-bundle
FontAwesome Symfony2 integration
Installs: 268
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- fortawesome/font-awesome: *
- symfony/framework-bundle: ~2.3
README
FortAwesome/Font-Awesome integration for Symfony2.
- Fonts installation
- Preconfigured asset
Composer installation:
{ "require": { "ekyna/fontawesome-bundle": "0.1.*@dev" }, "scripts": { "post-install-cmd": [ "Ekyna\\FontAwesomeBundle\\Composer\\ScriptHandler::install" ], "post-update-cmd": [ "Ekyna\\FontAwesomeBundle\\Composer\\ScriptHandler::install" ] }, }
Register bundle in kernel:
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( ... new Ekyna\FontAwesomeBundle\EkynaFontAwesomeBundle() ); } }
Fonts installation without composer script handler:
php app:console ekyna:fontawesome:install
Configuration (optionnal, default values)
# app/config/config.yml ekyna_fontawesome: output_dir: ~ assets_dir: %kernel.root_dir%/../vendor/fortawesome/font-awesome configure_assetic: true
Use in a twig template:
{% stylesheets output='css/backend.css' filter='cssrewrite, ?yui_css' ... 'css/fontawesome.css' ... %} <link href="{{ asset_url }}" rel="stylesheet" type="text/css" /> {% endstylesheets %}