Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 20th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. # namespace Path\To\Your\Bundle\Form;
  4.  
  5. class ItemLocaleType extends AbstractType
  6. {
  7.  
  8.     public function buildForm(FormBuilder $builder, array $options)
  9.     {
  10.         $builder->add('title', 'text', array(
  11.             'required' => false,
  12.         ));
  13.     }
  14.  
  15.     public function getDefaultOptions(array $options)
  16.     {
  17.         return array(
  18.             'data_class' => 'Path\To\Your\Bundle\Entity\ItemLocale',
  19.         );
  20.     }
  21.  
  22.     public function getName()
  23.     {
  24.         return 'itemlocaleform';
  25.     }
  26.  
  27. }