Преглед на файлове

Fix breadcrumbs for custom routes when subject is empty

Hi. When I open my custom routes, there is no label in breadcrumbs for it, because subject is empty.
Andrey Shkodyak преди 12 години
родител
ревизия
764bd0a047
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      Admin/Admin.php

+ 1 - 2
Admin/Admin.php

@@ -2014,8 +2014,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
             $menu = $menu->addChild($this->toString($this->getSubject()));
         } elseif ($action != 'list') {
             $menu = $menu->addChild(
-//                $this->trans($this->getLabelTranslatorStrategy()->getLabel(sprintf('%s_%s', $this->getClassnameLabel(), $action), 'breadcrumb', 'link'))
-                  $this->toString($this->getSubject())
+                $this->trans($this->getLabelTranslatorStrategy()->getLabel(sprintf('%s_%s', $this->getClassnameLabel(), $action), 'breadcrumb', 'link'))
             );
         } else {
             $menu->getBreadcrumbsArray();