Sulu\Bundle\ContentBundle\Form\Type\AbstractStructureBehaviorType::buildForm PHP Méthode

buildForm() public méthode

public buildForm ( Symfony\Component\Form\FormBuilderInterface $builder, array $options )
$builder Symfony\Component\Form\FormBuilderInterface
$options array
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('title', TextType::class);
        $builder->add('structureType', TextType::class);
        $builder->add('structure', TextType::class, ['property_path' => 'structure.stagedData']);
        $builder->addEventListener(FormEvents::PRE_SUBMIT, [DataNormalizer::class, 'normalize']);
    }

Usage Example

Exemple #1
0
 /**
  * {@inheritDoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('workflowStage');
     // TODO: Fix the admin interface to not send this junk (not required for snippets)
     $builder->add('redirectType', 'text', ['mapped' => false]);
     $builder->add('resourceSegment', 'text', ['mapped' => false]);
     $builder->add('navigationContexts', 'text', ['mapped' => false]);
     $builder->add('shadowLocaleEnabled', 'text', ['mapped' => false]);
 }
All Usage Examples Of Sulu\Bundle\ContentBundle\Form\Type\AbstractStructureBehaviorType::buildForm
AbstractStructureBehaviorType