简体   繁体   中英

How to implements Nested tree list with doctrine in symfony

I need a Nested tree in my project build on Symfony3 with doctrine. I read this article - link . I understand how it works, but I'm a beginner in symfony and doctrine. So my question is how to implements this in symfony. I've searched for an bundle, which can provide that, but I didn't find any.

My first though was that I will create an entity a than in Controller do what I need (with SQL statemens in doctrine). But I know that it is really bad practice.

So where to store which code? Should I have entity with functions like insertNode, deleteNode (with SQL in it)?

Thanks for advice for best practice on this.

您需要Doctrine Extensions Bundle的 Tree 功能

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM