Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple TreePath and TreePathSource fields #2905

Open
hardikaspl opened this issue Dec 24, 2024 · 1 comment
Open

Multiple TreePath and TreePathSource fields #2905

hardikaspl opened this issue Dec 24, 2024 · 1 comment

Comments

@hardikaspl
Copy link

Feature Request

Is there any chance i can have multiple TreePath and TreePathSource fields ?

#[ORM\Column(name: "category", type: "text", nullable: true)]
#[Gedmo\TreePath(separator: "|", appendId: false, endsWithSeparator: false)]
protected $category;

#[ORM\Column(name: "name", type: "string", length: 255)]
#[Gedmo\Translatable]
#[Gedmo\TreePathSource(field: category)]
protected $name;

#[Gedmo\TreePath(separator: "/", appendId: false, endsWithSeparator: false)]
#[ORM\Column(name: "path", type: "string", length: 3000, nullable: true)]
protected $path;

#[ORM\Column(name: "slug", type: "string", length: 255)]
#[Gedmo\TreePathSource(field: path)]
#[Gedmo\Slug(fields: ["name"], unique: false)]
protected $slug;
@jacks-sam1010
Copy link

Hello, we tried to solve the issue.

This is what we did:

Implement the ability to have multiple TreePath and TreePathSource fields in the Tree extension, as requested in the GitHub issue.

You can review changes in this commit: jacks-sam1010@f8dcc86.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants