<?php
namespace App\Form;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use App\Entity\Batch;
/**
*
* @author wendell.zheng <wxzheng@ustc.edu.cn>
*/
class BatchType extends NameType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add('open', null, [
'label' => '开放日期',
'widget' => 'single_text'
])
->add('type', ChoiceType::class, [
'label' => '类别',
'choices' => array_combine(Batch::TYPES, Batch::TYPES),
'required' => true
])
->add('applyDeadline', null, [
'widget' => 'single_text',
'label' => '教师申请截止日期'
])
->add('collegeDeadline', null, [
'widget' => 'single_text',
'label' => '学院推荐截止日期'
]);
}
}