Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sonata admin label on breadcrumb

I have a little problem with sonata admin on Symfony.
I would like to change the default admin label in the breadcrumb:

enter image description here

but I can't find any solution. Can someone help me?

I found this function, but it doesn't work. It looks like that this function is not called.

public function buildBreadcrumbs($action, MenuItemInterface $menu = null) {
    $breadCrumb =  parent::buildBreadcrumbs($action, $menu);

    return $breadCrumb;
}

I use Symfony 2.8.

like image 764
Andrea G. Pigliafreddo Avatar asked Dec 22 '16 21:12

Andrea G. Pigliafreddo


1 Answers

Try to override classNameLabel property in your admin class:

// in your ProductAdmin class
public function configure()
{
    $this->classnameLabel = "Products";
}
like image 129
Yehor Avatar answered Sep 23 '22 21:09

Yehor