mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 05:24:28 +02:00
Group label profiles by their supported element on admin page.
This commit is contained in:
parent
f16dec51b6
commit
747962884a
3 changed files with 81 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue