dev-master
9999999-dev https://github.com/cristianpana86/Hierarchy management with Neo4j and Symfony
LGPL-3.0+
The Requires
- everyman/neo4jphp dev-master
- php >=5.3.0
- ext-curl *
by Cristian Pana
symfony neo4j
Hierarchy management with Neo4j and Symfony
Hierarchy Management with Neo4j and Symfony, (*1)
This Symfony bundle manages a company hierarchy retrieving and stroring information to a Neo4j database. The hierarchy is based on groups: PHP group is part of Software Developement group, which is part of IT, etc. The users are members of these groups having differend kind of roles (manager, employee etc)., (*2)
HierarchyBundle comes with a front where regular user can just browse data and an Admin area from where you can create, edit, delete info., (*3)
I got the idea for this bundle from the Neo4j documentation: http://neo4j.com/docs/stable/examples-user-roles-in-graphs.html HierarchyBundle is using the Neo4jPHP library https://github.com/jadell/neo4jphp, (*4)
Use composer:, (*5)
composer require cpana/hierarchybundle
Register the bundle in AppKernel:, (*6)
new CPANA\HierarchyBundle\CPANAHierarchyBundle(),
Add your parameters to app/config/config.yml:, (*7)
cpana_hierarchy: group_hierarchy_manager_neo4j: neo4j_user: 'user' neo4j_password: 'password' def_rel_type_group_to_group: 'PART_OF' def_rel_type_user_to_group: 'MEMBER_OF' root_group_id: '11111' manager_role_property: 'manager' default_property_group: 'name' default_property_user: 'name'
You need to specify which is the root group node of your hierarchy by prodiving the Neo4j Id of that node in parameter "root_group_id"., (*8)
Import routes to app/config/routing.yml:, (*9)
cpana_hierarchy: resource: "@CPANAHierarchyBundle/Controller/" prefix: /h type: annotation
Install assets:, (*10)
php app/console assets:install
In your browser type your project path and add app_dev.php/h/admin/home. If you are using the sample data provided in the Wiki https://github.com/cristianpana86/HierarchyBundle/wiki/Sample-data search for user Peter, you should see something like this:, (*11)
, (*12)
TO DO: 1. Write tests 2. Handle nodes with 2 fathers, (*13)
Hierarchy management with Neo4j and Symfony
LGPL-3.0+
symfony neo4j