StofDoctrineExtension Tree entity: get the id of the parent in twig
问题 I'm using DoctrineExtensions Tree for my entity account. I'm getting my results with the following: $repo = $em->getRepository('NRtworksChartOfAccountsBundle:Accounttree'); $arrayTree = $repo->childrenHierarchy(); Entity Accounttree is the classic entity following the doc: /** * @Gedmo\Tree(type="nested") * @ORM\Table(name="Accounttree") * use repository for handy tree functions * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") */ class Accounttree { /** *