简体   繁体   中英

Sonata User Bundle security roles template override

I am using symphony 2.8 with sonata admin/user/fosuser bundle. 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

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

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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