symfony 2.3 - SonataAdmin change template list for Admin Users -


i new user in sonata admin + fosuserbunle. need create new template list when user admin. check , redirect in crud controller or in sonata admin.

if need admin class , change style template, best option redirect in de sonata admin class. overwrite gettemplate() method.

class yourentityadmin extends admin {       public function gettemplate($name)      {          if ($this->configurationpool->getcontainer()->get('security.context')->isgranted('role_admin'))           {             switch ($name) {                 case 'list':                     return 'yourbundle:entity:list.html.twig';                 default:                     return parent::gettemplate($name);             }         } else {             return parent::gettemplate($name);         }     } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -