Created
September 25, 2011 19:24
-
-
Save pjedrzejewski/1241008 to your computer and use it in GitHub Desktop.
Easy categorizing with Symfony2, gist #6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Bundle\AssortmentBundle\Form\Type; | |
use Sylius\Bundle\AssortmentBundle\Form\Type\ProductFormType as BaseProductFormType; | |
use Symfony\Component\Form\FormBuilder; | |
class ProductFormType extends BaseProductFormType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
parent::buildForm($builder, $options); | |
$builder | |
->add('category', 'sylius_catalog_category_choice', array( | |
'multiple' => false, | |
'catalog_alias' => 'assortment' | |
)) | |
; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment