HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/dvpis2025/dvpis.kaunokolegija.lt/src/Form/ProcessDatesType.php
<?php

namespace App\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;

class ProcessDatesType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
                ->add('stage', ChoiceType::class, [
                    'label' => 'Etapas',
//                    'multiple' => false,
//                    'expanded' => false,
                    'choices' => [
                        'PLANAVIMAS' => 'PLANAVIMAS',
                        'PLANAVIMAS_VEIKLU' => 'PLANAVIMAS_VEIKLU',
                        'IVYKDYMAS' => 'IVYKDYMAS',
                        'DESTYTOJO_DARBO_LAIKAS' => 'DESTYTOJO_DARBO_LAIKAS',
                        'DESTYTOJO_SAVIANALIZES_FORMA' => 'DESTYTOJO_SAVIANALIZES_FORMA',
                    ]
                ])

                ->add('name', null, ['label' => 'Etapo pavadinimas'])
                ->add('dateFrom', DateType::class, [
                    'label' => 'Data nuo ',
                    'widget' => 'single_text',
                    // this is actually the default format for single_text
//                    'format' => 'Y-MM-dd',
                    'html5' => false,
                    'attr' => [
                        'class' => 'calendar'
                    ],
                ])
                ->add('dateTo', DateType::class, [
                    'label' => 'Data iki ',
                    'widget' => 'single_text',
                    // this is actually the default format for single_text
//                    'format' => 'Y-MM-dd',
                    'html5' => false,
                    'attr' => [
                        'class' => 'calendar'
                    ],
                ])
                ->add('description', null, ['label' => 'ApraĊĦas'])
        ;
    }

    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'App\Entity\ProcessDates'
        ));
    }

    /**
     * {@inheritdoc}
     */
    public function getBlockPrefix()
    {
        return 'App_processdates';
    }
}