Group label profiles by their supported element on admin page.

This commit is contained in:
Jan Böhmer 2020-04-29 22:59:14 +02:00
parent f16dec51b6
commit 747962884a
3 changed files with 81 additions and 2 deletions

View file

@ -118,10 +118,15 @@ class TreeViewGenerator
$item->addTag((string) \count($item->getNodes()));
}
if (! empty($href_type)) {
if (! empty($href_type) && $item->getId() !== null) {
$entity = $this->em->getPartialReference($class, $item->getId());
$item->setHref($this->urlGenerator->getURL($entity, $href_type));
}
//Translate text if text starts with $$
if (substr($item->getText(), 0, 2) === '$$') {
$item->setText($this->translator->trans(substr($item->getText(), 2)));
}
}
return array_merge($head, $generic);