PHP code example of onlinq / form-collection-bundle

1. Go to this page and download the library: Download onlinq/form-collection-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/ */

    

onlinq / form-collection-bundle example snippets


// ...
use Onlinq\FormCollectionBundle\Form\OnlinqCollectionType;

class TaskType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // ...
            ->add('tags', OnlinqCollectionType::class, [
                'entry_type' => TagType::class,
                'entry_options' => ['label' => false],
                'allow_add' => true,
                'allow_delete' => true,
                'allow_move' => true,
            ])
            // ...
        ;
    }

    // ...
}