Builds the image options form.

@param FormBuilderInterface $builder
@param array                $options
485447
private function buildImageOptionsForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('align', Type\ChoiceType::class, [
                'label'    => 'ekyna_cms.block.field.align',
                'choices'  => [
                    'Left'   => 'left',
                    'Center' => 'center',
                    'Right'  => 'right',
                ],
                'required' => true,
                'select2'  => false,
            ])
            ->add('max_width', Type\TextType::class, [
                'label'       => 'ekyna_cms.block.field.max_width',
                'required'    => false,
                'constraints' => [
                    new Assert\Regex([
                        'pattern' => '/^\d+(px|%)$/'
                        // TODO message translation
                    ]),
                ],
            ])
            ->add('theme', Type\ChoiceType::class, [
                'label'       => 'ekyna_cms.block.field.theme',
                'choices'     => array_flip($options['themes']),
                'placeholder' => 'ekyna_core.value.none',
                'required'    => false,
                'select2'     => false,
            ])
            ->add('style', Type\ChoiceType::class, [
                'label'       => 'ekyna_cms.block.field.style',
                'choices'     => array_flip($options['styles']),
                'placeholder' => 'ekyna_core.value.none',
                'required'    => false,
                'select2'     => false,
            ])
            ->add('animation', AnimationType::class, [
                'animations' => $options['animations'],
            ]);
    }
970325
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('data', CollectionType::class, array(
                'entry_type' => PageMenuItemType::class,
                'allow_add' => true,
                'allow_delete' => true,
                'attr' => [
                    'class' => 'synapse-page-menu-data',
                ],
            ))
        ;
    }
1210423
public function buildForm(FormBuilderInterface $builder, array $options)
	{
		$user_transformer = new StringToUserTransformer($this->userManager);
		$builder->addModelTransformer($user_transformer);
	}
10363
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        parent::buildForm($builder, $options);

        $transformerStrategy = $options['transformer'];
        if ($transformerStrategy === 'auto') {
            $transformerStrategy = $options['multiple'] ? 'multiple' : 'class';
        }

        switch ($transformerStrategy) {
            case 'class':
                $builder->addViewTransformer(new ClassTransformer($this->quicklist, $options['repo']));
                break;

            case 'none':
                $builder->addViewTransformer(new NoneTransformer($this->quicklist, $options['repo']));
                break;

            case 'multiple':
                $builder->addViewTransformer(new MultipleTransformer(new ClassTransformer($this->quicklist, $options['repo'])));
                break;

            case 'multiple_none':
                $builder->addViewTransformer(new MultipleTransformer(new NoneTransformer($this->quicklist, $options['repo'])));
                break;
        }
    }
959194
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        parent::buildForm($builder, $options);

        $this->addIban($builder)
            ->addBic($builder);
    }
947462
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        //====================================================================//
        // Dispatch Object Listing Event
        $this->getEventDispatcher()->dispatch(FormListingEvent::NAME, new FormListingEvent($builder, $options));
    }
1101718
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $required = true;
        if ($options['data']->getId()) {
            $required = false;
        }
        $builder
            ->add('active', CheckboxType::class, array('label' => 'Aktiviert', 'required' => false))
            ->add('name', TextType::class, array('label' => 'Name'))
            ->add(
                'uploadedFile',
                FileType::class,
                array(
                    'label' => 'Upload',
                    'required' => $required,
                    'constraints' => array(
                        new File(array('maxSize' => "2M")),
                        //new Image(),
                    ),
                )
            );
    }
734336
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $pageHandler = $this;
        $builder
            ->add('model', 'choice', array(
                'choices'        => $this->models,
                'required'       => TRUE,
                'error_bubbling' => TRUE,
                'constraints'    => array(
                    new NotBlank(array('message' => 'fulgurio.lightcms.pages.add_form.model_is_required'))
                )
            ))
            ->add('title', 'text', array(
                'error_bubbling' => TRUE,
                'constraints'    => array(
                    new NotBlank(array('message' => 'fulgurio.lightcms.pages.add_form.title_is_required'))
                )
            ))
            ->add('parent', 'entity', array(
                'class'          => 'FulgurioLightCMSBundle:Page',
                'property'       => 'title',
                'error_bubbling' => TRUE,
                'query_builder'  => function(EntityRepository $er) {
                    return $er->createQueryBuilder('p')
                            ->orderBy('p.title', 'ASC');
                },
            ))
            ->add('fullpath', 'hidden')
            ->add('content', 'text')
            ->add('status', 'choice', array(
                'choices'         => $this->status,
                'required'        => TRUE,
                'error_bubbling'  => TRUE,
                'invalid_message' => 'fulgurio.lightcms.pages.add_form.status_is_required'
            ))
            ->add('meta_keywords', 'text', array(
                'required' => FALSE,
                'mapped'   => FALSE
            ))
            ->add('meta_description', 'text', array(
                'required' => FALSE,
                'mapped'   => FALSE
            ))
            ->add('sourceId', 'hidden')
            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($pageHandler) {
                $form = $event->getForm();
                $title = $form->get('title');
                if (in_array(LightCMSUtils::makeSlug($title->getData()), $pageHandler->getSlugExclusions()))
                {
                    $title->addError(new FormError('fulgurio.lightcms.pages.add_form.title_is_not_allowed'));
                }
            })
        ;
        if (!empty($this->langs) && count($this->langs) > 1)
        {
            $builder->add('lang', 'choice', array(
                    'choices'        => $this->langs,
                    'required'       => TRUE,
                    'error_bubbling' => TRUE
                )
            );
        }
        if (!empty($this->menus))
        {
            $builder->add('availableMenu', 'choice', array(
                'choices'        => $this->menus,
                'multiple'       => TRUE,
                'required'       => FALSE,
                'error_bubbling' => TRUE
                )
            );
        }
    }
280585
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        if (!$options['csrf_protection']) {
            return;
        }

        $builder
            ->addEventSubscriber(new CsrfValidationListener(
                $options['csrf_field_name'],
                $options['csrf_token_manager'],
                $options['csrf_token_id'] ?: ($builder->getName() ?: \get_class($builder->getType()->getInnerType())),
                $options['csrf_message'],
                $this->translator,
                $this->translationDomain,
                $this->serverParams
            ))
        ;
    }
784596
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        parent::buildForm($builder, $options);
        $builder->get('value')->addModelTransformer(new StringToBooleanTransformer('1'));
    }
42490
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        if (null !== $options['class']){
            $this->transformer->setClass($options['class']);
            $builder->addModelTransformer($this->transformer);
        }   
    }
69422
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', TextType::class, [
                'label'       => 'blog.form.title.label',
                'required'    => true,
                'constraints' => [
                    new \Symfony\Component\Validator\Constraints\NotBlank(),
                ],
                'attr' => [
                    'class' => 'vic-blogCategoryWidget-formControl',
                    ],
                ]
            )
            ->add('description', TextType::class, [
                'label'         => 'blog.form.description.label',
                'attr'          => [
                    'class'     => 'vic-blogCategoryWidget-formControl',
                ],
            ])
            ->remove('removeButton');

        /*
         * When we are editing a menu, we must add the sub menus if there are some children in the entity
         */
        $builder->addEventListener(
            FormEvents::PRE_SET_DATA,
            function (FormEvent $event) {
                $entity = $event->getData();

                if ($entity !== null) {
                    $nbChildren = count($entity->getChildren());

                    if ($nbChildren > 0) {
                        $form = $event->getForm();
                        $this->addChildrenField($form);
                    }
                }
            }
        );

        /*
         * we use the PRE_SUBMIT event to avoid having a circular reference
         *
         * This is done when a widget is created in js in the view
         */
        $builder->addEventListener(
            FormEvents::PRE_SUBMIT,
            function (FormEvent $event) {
                $rawData = $event->getData();
                if (isset($rawData['children'])) {
                    $addChildren = true;
                } else {
                    $addChildren = false;
                }

                //did some children was added in the form
                if ($addChildren) {
                    $form = $event->getForm();
                    $this->addChildrenField($form);
                }
            }
        );
    }
1288231
public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add('image', MediaType::class, [
                'label' => 'production.form.image',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
                'provider' => 'sonata.media.provider.image',
                'context' => 'default',
            ])
            ->add('banner', MediaType::class, [
                'label' => 'production.form.banner',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
                'provider' => 'sonata.media.provider.image',
                'context' => 'default',
            ])
            ->add('description', CKEditorType::class, [
                'label' => 'production.form.description',
                'required' => false,
                'config' => ['toolbar' => 'basic'],
            ])
        ;
    }
1342419
public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add(
                self::START_NAME,
                DateType::class,
                [
                    'widget' => 'single_text',
                    'attr' => [
                        'placeholder' => 'sidus.filter.date_range.start_date',
                    ],
                ]
            )
            ->add(
                self::END_NAME,
                DateType::class,
                [
                    'widget' => 'single_text',
                    'attr' => [
                        'placeholder' => 'sidus.filter.date_range.end_date',
                    ],
                ]
            );
    }
246242
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('idPage', 'hidden', array('label' => 'pages_controller_label_permalink'));
        $builder->add('idLanguage', 'choice', array('choices' => ChoiceValues::getLanguages($this->languageRepository)));
        $builder->add('permalink', 'textarea', array(
            'label' => 'pages_controller_label_permalink',
            'attr' => array(
                'rows' => '3',
            ),));
        $builder->add('title', 'textarea', array(
            'label' => 'pages_controller_label_meta_title',
            'attr' => array(
                'title' => 'pages_controller_meta_title_explanation',
                'rows' => '3',
            ),
        ));
        $builder->add('description', 'textarea', array(
            'label' => 'pages_controller_label_meta_description',
            'attr' => array(
                'title' => 'pages_controller_meta_description_explanation',
                'rows' => '3',
            ),
        ));
        $builder->add('keywords', 'textarea', array(
            'label' => 'pages_controller_label_meta_keywords',
            'attr' => array(
                'title' => 'pages_controller_meta_keywords_explanation',
                'rows' => '2',
            ),
        ));
        $builder->add('sitemapChangeFreq', 'choice', array(
            'choices' => array(
                '' => '-',
                'always' => 'always',
                'hourly' => 'hourly',
                'daily' => 'daily',
                'weekly' => 'weekly',
                'monthly' => 'monthly',
                'yearly' => 'yearly',
                'never' => 'never',
            ),
            'label' => 'pages_controller_label_change frequency',
        ));
        $builder->add('sitemapPriority', 'choice', array(
            'choices' => array(
                '0.0' => '0.0',
                '0.1' => '0.1',
                '0.2' => '0.2',
                '0.3' => '0.3',
                '0.4' => '0.4',
                '0.5' => '0.5',
                '0.6' => '0.6',
                '0.7' => '0.7',
                '0.8' => '0.8',
                '0.9' => '0.9',
                '1.0' => '1.0',
            ),
            'data' => '0.5',
            'label' => 'pages_controller_label_priority',
        ));
    }
196584
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->addModelTransformer(new CallbackTransformer(
            function ($original) {
                $tree = $this->blockService->getTree($original);

                return json_encode($tree);
            },
            function ($submitted) {
                $array = json_decode($submitted, true);

                $stripped = $this->stripMetadata($array);

                return trim(json_encode($stripped));
            }
        ));
    }
870752
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->addModelTransformer($this)

            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder, $options) {
                $form = $event->getForm();
                $zone = $event->getData();

                // Create a component form for each into given zone
                $form->add('components', CollectionType::class, array(
                    'auto_initialize' => false,
                    'allow_add' => false,
                    'allow_delete' => false,
                    'entry_type' => ComponentType::class,
                    'entry_options' => array(
                        'variation' => $this->variationResolver->resolve((new VariationContext())->denormalize(array(
                            'theme' => $options['theme'],
                            'content_type' => $options['content_type'],
                            'template_type' => $options['template_type'],
                            'zone_type' => $zone->getZoneType(),
                        ))),
                    ),
                ));
            })
        ;
    }