/** * {@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]); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('extensions', TextType::class, ['property_path' => 'extensionsData']); $builder->add('resourceSegment', TextType::class); $builder->add('navigationContexts', CollectionType::class, ['type' => TextType::class, 'allow_add' => true, 'allow_delete' => true]); $builder->add('redirectType', IntegerType::class); $builder->add('redirectTarget', DocumentObjectType::class); $builder->add('redirectExternal', TextType::class); $builder->add('workflowStage', IntegerType::class); $builder->add('shadowLocaleEnabled', CheckboxType::class); $builder->add('shadowLocale', TextType::class); // TODO: Should be choice of available shadow locales $builder->setAttribute('webspace_key', $options['webspace_key']); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('parent', 'document_object'); $builder->add('extensions', 'text', ['property_path' => 'extensionsData']); $builder->add('resourceSegment', 'text'); $builder->add('navigationContexts', 'collection', ['type' => 'text', 'allow_add' => true, 'allow_delete' => true]); $builder->add('redirectType', 'integer'); $builder->add('redirectTarget', 'document_object'); $builder->add('redirectExternal', 'text'); $builder->add('workflowStage', 'integer'); $builder->add('shadowLocaleEnabled', 'checkbox'); $builder->add('shadowLocale', 'text'); // TODO: Should be choice of available shadow locales $builder->setAttribute('webspace_key', $options['webspace_key']); $builder->setAttribute('clear_missing_content', $options['clear_missing_content']); $builder->addEventListener(FormEvents::POST_SUBMIT, [$this, 'postSubmitDocumentParent']); }