📜  选择类型 symfony - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:18.707000             🧑  作者: Mango

代码示例1
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
// ...

$builder->add('isAttending', ChoiceType::class, [
    'choices'  => [
        'Maybe' => null,
        'Yes' => true,
        'No' => false,
    ],
]);