我正在构建我的第一个严肃的Symfony2项目。我正在为我的用户/组管理扩展FOSUserBundle,我希望将新用户自动添加到默认组中。我想你只需要像这样扩展用户实体构造函数: * Constructorpublic function __construct() parent::__construct()that group entity to my new user :}
但我的
我们正在尝试从CustomerProfileType扩展,我们得到的错误如下:"code": 500,
"message": "Could not load type "abc\Form\Extension\AdminApi\CustomerProfileTypeExtension": class does not implement "Symfony\Component\Form\FormTypeInterface
我想要创建一个新的表单类型,可以在symfony2和symfony3中使用。问题是它扩展了实体表单类型,我找不到创建getParent()函数的通用方法,因为在symfony2中如下所示:{}public function getParent() return EntityType::class;有任何方法可以用一种常见的方式来