Skip to content

Instantly share code, notes, and snippets.

View krzyc's full-sized avatar

krzyc

View GitHub Profile
@npotier
npotier / ProductAdmin.php
Last active July 15, 2017 02:34
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(