How to show font awesome icon in symfony form select
问题 I Want to show all font awesome icon in select option with Symfony Form Builder. I add the select field with : $choices = $this->getFontAwesome(); $form->add( $key, ChoiceType::class, array('label' => 'Texte', 'choices' => $choices, 'attr' => array('class' => "fa" ) ) ); My Function getFontAwesome(); public function getFontAwesome(){ $webroot = $this->get('kernel')->getRootDir() . '/../web'; $pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"\\\\(.+)";\s+}/'; $subject = file_get