PHP code example of bml / form-theme-bundle

1. Go to this page and download the library: Download bml/form-theme-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bml / form-theme-bundle example snippets


class YourType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
           ->add('field')
           [...]
    }
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'theme' => 'app/form/my_type_theme.html.twig'
        ]);
    }
}