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

Untitled

By: a guest on Aug 19th, 2012  |  syntax: PHP  |  size: 0.67 KB  |  hits: 12  |  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. // src/Corvus/AdminBundle/Form/Type/NavigationType.php
  4. namespace Corvus\AdminBundle\Form\Type;
  5.  
  6. use Symfony\Component\Form\AbstractType;
  7. use Symfony\Component\Form\FormBuilder;
  8.  
  9. class NavigationType extends AbstractType
  10. {
  11.         public function buildForm(FormBuilder $builder, array $options)
  12.         {
  13.                 $builder->add('check', 'checkbox', array(
  14.                         'property_path' => false,
  15.                         ));
  16.                 $builder->add('href');
  17.                 $builder->add('title');
  18.                 $builder->add('alt');
  19.         }
  20.  
  21.         public function getDefaultOptions(array $options)
  22.         {
  23.                 return array(
  24.                         'data_class' => 'Corvus\AdminBundle\Entity\Navigation',
  25.                 );
  26.         }
  27.  
  28.         public function getName()
  29.         {
  30.                 return 'navigation';
  31.         }
  32. }