<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use App\Util\ScoreUtil;
/**
*
* @author wendell.zheng <wxzheng@ustc.edu.cn>
*/
class ScoreType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('rank', ChoiceType::class, [
'label' => '等级',
'choices' => ScoreUtil::getRankOptions(),
'expanded' => true
])
->add('score', null, [
'label' => '分数',
'required' => true
])
->add('suggestion', null, [
'label' => '评审意见',
'required' => true,
'attr' => [
'rows' => 10
]
]);
}
}