<?php

namespace App\Form;

use App\Entity\Businessunit;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class BusinessunitType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
        ->add('name',TextType::class, [       
            'attr' => ['autofocus' => true, 'class' => 'form-control'],
            'label' => 'Business Unit Name*',
        ])
        ->add('shortname',TextType::class, [       
            'attr' => ['class' => 'form-control'],
            'label' => 'Short Name*',
        ])
        // ->add('remarks')
        ;
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => Businessunit::class,
        ]);
    }
}
