Skip to content

Instantly share code, notes, and snippets.

@nicolaskern
nicolaskern / ProductAdmin.php
Last active May 20, 2016 16:48 — forked from npotier/ProductAdmin.php
Use the code below to add the "add buton" to a sonata model autocomplete form Raw
<?php
// src/ACSEO/AdminBundle/Admin/ProductAdmin.php
// ...
protected function configureFormFields(FormMapper $formMapper)
{
// ...
$formMapper
->add('codes', 'sonata_type_model_autocomplete', array(