Coder Social home page Coder Social logo

bartko-s / stefano-tree Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 8.0 563 KB

Framework agnostic Nested Set (MPTT) implementation for PHP

Home Page: https://bartko-s.github.io/stefano-tree

License: BSD 3-Clause "New" or "Revised" License

PHP 99.87% Dockerfile 0.13%
tree mptt nested-set hierarchical-data tree-structure doctrine-dbal doctrine2 laminas laminas-db pdo

stefano-tree's People

Contributors

bartko-s avatar codelingobot avatar tomasfejfar avatar tsmgeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stefano-tree's Issues

Moving nodeitem up/down

Is there any way to move a Node up or down by X positions.
Example, changing the order of a set of child nodes you would need to move a single item up or down in a list, this could be move by X up/down within its level, not having to specify target node.

Add Phalcon support

Could you please support Phalcon so we can use models instead of using direct database access ?

Simplify NestedSet::__construct

Although it says in the README that it doesn't have any dependencies, the way it's today, it needs Doctrine and Zend\Db. It needs to be installed to be able to use the NestedSet class. I think that class only needs to get an instance of an AdapterInterface and everything else should be handled outside of this class.

What do you think?

Do you have a full list of BC breaks?

I'm trying to upgrade from 2.x to 4.x and I can't find any BC breaks before 3.1 unless I search through all revisions of the update file. Is there a summary I can find somewhere? Right now I fail properly upgrading due to the lack of BC break documentation and what the replacement of those functions should be.

Softdelete behaviar

Any guide for using soft delete behavior in data ?

Show all, or show just Undeleted for tree results.

Thanks for awesome and useful project btw ๐Ÿ‘

What is the scope and the target?

Hi,
I have few questions.
What is a scope?
Is there a way to have many root nodes?
When you move a node, will the "target" be the new parentId?

Thanks!

A Typical Data Field and Value for a Node

I've been trying to integrate this library into Joomla components.
My actual struggle is; for an example taking the following code from the documentation:

` try {
$data = array(
// values
// id_column_name => uuid
);

 // create root node.
 $rootNodeId = $tree->createRootNode($data);  
 // create root node. Second param "$scope" is required only if scope support is enabled.
 $rootNodeId = $tree->createRootNode($data, $scope);    
 } catch (ValidationException $e) {
 $errorMessage = $e->getMessage();
  } `

what is going to be the values for this section
$data = array( // values // id_column_name => uuid );

if my database table has these columns
'tableName' => 'vz0q4_users', 'idColumnName' => 'id', 'sequenceName' => 'categories', 'scopeColumnName' => 'scope', 'leftColumnName' => 'lft', 'rightColumnName' => 'rght', 'levelColumnName' => 'level', 'parentIdColumnName' => 'parent_id'

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.