Font Awesome Picker for Symfony 2+
MIT License
Implementation of FontAwesome Picker Form Type for Symfony 2+
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
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
));
}