0
在symfony的表单类型我有一个FormType
名为Symfony的FormType:如何在形式类型的文件拿到的样机
- KeywordType
- 消息类型
- ReplyTextMessage
- ReplyImageMessage
和里面的代码看起来像这样
KeywordType
$builder
->add('messages', CollectionType::class, [
'entry_type' => MessageType::class,
'prototype' => true,
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
)]
消息类型
$builder
->add('type', ChoiceType::class, [
'choices' => array_flip([
'text' => ReplyMessageInterface::TEXT,
'image' => ReplyMessageInterface::IMAGE,
]),
)]
问题是
如何获得的ReplyTextMessageType
和ReplyImageMessageType
原型内MessageType
,因为我想获得的所有ReplyMessageType在form_theme
如果你不明白我的问题,我会在这里回答任何小姐明白。
谢谢你的提前。
不清楚的问题!请尝试修改您的,删除不必要的部分,并大胆您的要求。 – Trix
@Trix啊好的只是片刻 –
@Trix问题已更新。 –