dbout / svg-loader-bundle
Small bundle to load Svg files for Symfony 4.
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- symfony/framework-bundle: ^4.3 || ^5.0
- twig/twig: ^2.0 || ^3.0
This package is auto-updated.
Last update: 2024-11-27 22:01:35 UTC
README
Petit bundle permettant de charger des fichiers Svg pour Symfony 4.
Installation
composer require dbout/svg-loader-bundle
Configuration
dbout_svg_loader: resourcePath: '%kernel.project_dir%/resources/svg/' # Chemin vers le dossier qui contient les svg
Utilisation
Dans twig
:
<p class="my-svg"> {{ svg('user') }} </p>
Dans un service :
use Dbout\Bundle\SvgLoader\Loader\DboutSvgLoaderInterface; public function contactUs(DboutSvgLoaderInterface $loader) { $svg = $loader->load('contact'); }