Show the count of the sub categories in the entity admin treeview.

This commit is contained in:
Jan Böhmer 2019-04-05 18:35:06 +02:00
parent 650b388a1d
commit d04a8626cb
5 changed files with 34 additions and 0 deletions

View file

@ -84,6 +84,10 @@ class TreeBuilder
$tree_node = new TreeViewNode($element->getName(), $href, $children_nodes);
if($children_nodes != null) {
$tree_node->addTag((string) count($children_nodes));
}
//Check if we need to select the current part
if ($selectedElement !== null && $element->getID() === $selectedElement->getID()) {
$tree_node->setSelected(true);