redking / fontawesome-picker-bundle
Font Awesome Picker for Symfony 2+
Installs: 1 901
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.4
- symfony/form: ^4.4|^5.4|^6.4
- symfony/framework-bundle: ^4.4|^5.4|^6.4
Requires (Dev)
- phpunit/phpunit: ^5.4 || ^6.5 || ^9.5
README
Implementation of FontAwesome Picker Form Type for Symfony 2+
Installation
Donwload the bundle with composer.
composer require redking/fontawesome-picker-bundle
Register the bundle in the kernel.
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Redking\FontAwesomePickerBundle\RedkingFontAwesomePickerBundle(), ); }
Add the following js and css to your layout assets :
/bundles/redkingfontawesomepicker/js/fontawesome-iconpicker.min.js
/bundles/redkingfontawesomepicker/css/fontawesome-iconpicker.min.css
Usage
Use the form type as usual :
use Redking\FontAwesomePickerBundle\Form\Type\FontAwesomeType // ... public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('icon', FontAwesomeType::class, array( 'picker_options' => [], // You can pass here the options of the widget )); }