{"id":15880021,"url":"https://github.com/mazahaca/sonata-admin-tree-bundle","last_synced_at":"2025-10-05T18:03:28.169Z","repository":{"id":62534214,"uuid":"64072178","full_name":"maZahaca/sonata-admin-tree-bundle","owner":"maZahaca","description":"This bundle integrates jsTree and Gedmo Nested Set directly to Sonata Admin","archived":false,"fork":false,"pushed_at":"2022-05-22T10:02:44.000Z","size":54,"stargazers_count":30,"open_issues_count":4,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-16T11:41:42.241Z","etag":null,"topics":["jstree","nested-set","sonata-admin","symfony","tree","tree-bundle"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maZahaca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-24T15:30:06.000Z","updated_at":"2023-09-06T12:25:03.000Z","dependencies_parsed_at":"2022-11-02T15:15:29.326Z","dependency_job_id":null,"html_url":"https://github.com/maZahaca/sonata-admin-tree-bundle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maZahaca%2Fsonata-admin-tree-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maZahaca%2Fsonata-admin-tree-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maZahaca%2Fsonata-admin-tree-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maZahaca%2Fsonata-admin-tree-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maZahaca","download_url":"https://codeload.github.com/maZahaca/sonata-admin-tree-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244033646,"owners_count":20386967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jstree","nested-set","sonata-admin","symfony","tree","tree-bundle"],"created_at":"2024-10-06T03:07:10.783Z","updated_at":"2025-10-05T18:03:23.118Z","avatar_url":"https://github.com/maZahaca.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sonata-admin-tree-bundle\nThis bundle integrates [jsTree](https://www.jstree.com/) and [Gedmo Nested Set](https://github.com/stof/StofDoctrineExtensionsBundle) directly to [Sonata Admin](https://sonata-project.org/).\n\nA tree builds itself in an asynchronous way. Hence, it's quite good for big trees.\n\n## Installation\n\n### Install requirements\n\n**SonataAdminBundle**  \n\\- the SonataAdminBundle provides an installation article here:  \nhttp://symfony.com/doc/current/bundles/SonataAdminBundle/index.html\n\n**StofDoctrineExtensionsBundle**  \n\\- then you need to install StofDoctrineExtensionsBundle  \nhttps://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html\n\n**Enable Tree Extension**  \n\\- nested behaviour will implement the standard Nested-Set behaviour on your Entity  \nhttps://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md\n\n### Install TreeBundle\n\nInstall it via composer \n```bash\ncomposer require redcode/tree-bundle\n```\n\nRegister the bundle in your app kernel `./app/AppKernel.php`\n```php\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n            ...\n            new RedCode\\TreeBundle\\RedCodeTreeBundle(),\n        );\n        ...\n    }\n}\n```\n\nAdd the following lines to the routing file `./app/config/routing.yml`\n```yml\nredcode_tree:\n    resource: \"@RedCodeTreeBundle/Resources/config/routing.yml\"\n    prefix:   /admin\n```\n\n\nFor the entity with enabled [Gedmo Nested Set](https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md) follow these steps:\n\nExtend Admin class from `\\RedCode\\TreeBundle\\Admin\\AbstractTreeAdmin`\n```php\nclass SubjectAdmin extends AbstractTreeAdmin\n{\n...\n}\n```\n\nExtend AdminController from `\\RedCode\\TreeBundle\\Controller\\TreeAdminController`\n```php\nclass SubjectAdminController extends TreeAdminController\n{\n...\n}\n```\n\nWhen registering the admin as a service, you need to provide a fourth argument - the name of the field that will be shown in the tree. \n```yml\napp.admin.subject:\n    class: AppBundle\\Admin\\SubjectAdmin\n    arguments: [~, AppBundle\\Entity\\Subject, AppBundle:SubjectAdmin, 'word']\n    tags:\n        - {name: sonata.admin, manager_type: orm, group: Search, label: Subject}\n```\n\n## How it looks like\n\n![redcode/tree-bundle](http://g.recordit.co/QwdbrR3P9R.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazahaca%2Fsonata-admin-tree-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazahaca%2Fsonata-admin-tree-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazahaca%2Fsonata-admin-tree-bundle/lists"}