Alexander Kochetov
Alexander Kochetov
@mikehaertl > Why not add a convenience method for this which wraps up the necessary steps? Its already here. > if you just call insertBefore() with an existing node, will...
You can't set `treeAttribute`, `leftAttribute`, `rightAttribute` to custom values. They restricted by design. Due to NS nature `treeAttribute` should be equal to `id` so you can't use `treeAttribute` as FK...
Interesting feature. Will consider to implement.
Not sure about that. Can you show example when it may be interesting?
> If I want to move a node somewhere else, why should I need to load the target node, too? It should be enough to call $node->appendTo($id). > > you...
I already implemented is as trait as experiment. It works fine. I think its good idea to wait till 2.1 version of framework when behaviors will be replaced as traits.
@mikehaertl Unfortunately the discussion was in non relevant topics. But i think its good idea to create clean issue for such discussion inside Yii 2 repo.
Да, будет такая возможность.
@stifff Анализ необходимых изменений показал, что такую возможность делать идеологически не правильно. Рассматривайте `treeAttribute` как внутренний механизм для работы multiple root mode. Если необходима связь с какой либо внешней таблицей...
@stifff В будущих версиях скорее всего это будет реализовано через опцию `enableExternalRoots` при которой корни будут существовать в каких то внешних таблицах, т.к. если просто разрешить свои значения `treeAttribute` это...