E
E
EVOSandru62015-01-11 05:05:26
Yii
EVOSandru6, 2015-01-11 05:05:26

Is it possible to change the order of branches in yii using the NestedSetBehavior behavior?

For example, I have the following tree:
Goods
- Vegetables
- Potatoes -
Carrots
- Fruits
- Apples -
Pineapples
For example, I want to swap Fruits and Vegetables so that the right and left keys change correctly. It is desirable that this function works with an unlimited number of attachments.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Gubarev, 2015-01-11
@AlexGx

Of course you can. I understand version 1.1. Then like this:

// Model init code here
$fruits->moveBefore($vegetables);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question