Example #1
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('title')->add('description', 'textarea')->add('status')->add('price')->add('images', 'bootstrap_collection', array('type' => new ImageType(), 'allow_add' => true, 'allow_delete' => true, 'sub_widget_col' => 9, 'button_col' => 3, 'prototype_name' => 'inlinep', 'by_reference' => false))->add('category', 'entity', ['class' => 'AppBundle:Category', 'property' => 'op'])->add('age', 'text')->add('city', 'text')->add('proffesion')->add('hobby')->add('alcohol', 'choice', ['choices' => Product::getAlcoholChoices(), 'label' => 'Alkohol'])->add('smoke', 'choice', ['choices' => Product::getSmokeChoices(), 'label' => 'Papierosy'])->add('kitchen')->add('music')->add('books')->add('movies')->add('save', 'submit', ['label' => 'Create']);
 }