简体   繁体   English

Sonata用户捆绑包安全角色模板覆盖

[英]Sonata User Bundle security roles template override

I am using symphony 2.8 with sonata admin/user/fosuser bundle. 我在Sonata admin / user / fosuser软件包中使用了Symphony 2.8。 Everything is working fine. 一切正常。 I just want to override the security roles template because the roles title is not in meaningful. 我只想覆盖安全角色模板,因为角色标题没有意义。 I have followed the below solution. 我遵循以下解决方案。

https://github.com/dianuj89/Sonata-admin-user-friendly-view-for-security-roles https://github.com/dianuj89/Sonata-admin-user-friendly-view-for-security-roles

But it's not working I also have done to customization but getting following error. 但这对我也没有做自定义,但是出现以下错误,这是行不通的。

Catchable Fatal Error: Argument 1 passed to Sonata\\UserBundle\\Form\\Type\\SecurityRolesType::__construct() must be an instance of Sonata\\UserBundle\\Security\\EditableRolesBuilder, none given, called in D:\\xampp\\htdocs\\energyvalue\\vendor\\sonata-project\\core-bundle\\Form\\Extension\\DependencyInjectionExtension.php on line 94 and defined 可捕获的致命错误:传递给Sonata \\ UserBundle \\ Form \\ Type \\ SecurityRolesType :: __ construct()的参数1必须是Sonata \\ UserBundle \\ Security \\ EditableRolesBuilder的实例,未给出,在D:\\ xampp \\ htdocs \\ energyvalue \\ vendor中调用\\ sonata-project \\ core-bundle \\ Form \\ Extension \\ DependencyInjectionExtension.php在第94行并已定义

Your help is much appreciated. 非常感谢您的帮助。 Thanks 谢谢

The simplest way is to provide translation messages for the role names. 最简单的方法是为角色名称提供翻译消息。

#Resources/translations/messages.en.yml

ROLE_SONATA_ADMIN: 'My custom label'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM