mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix TreeBehavior does access property/method via model
This commit is contained in:
parent
420336f536
commit
21502db34a
1 changed files with 3 additions and 2 deletions
|
@ -112,11 +112,12 @@ class TreeBehavior extends ModelBehavior {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _setChildrenLevel(Model $Model, $id) {
|
protected function _setChildrenLevel(Model $Model, $id) {
|
||||||
$settings = $Model->Behaviors->Tree->settings[$Model->alias];
|
$settings = $this->settings[$Model->alias];
|
||||||
$primaryKey = $Model->primaryKey;
|
$primaryKey = $Model->primaryKey;
|
||||||
$depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]);
|
$depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]);
|
||||||
|
|
||||||
$children = $Model->children(
|
$children = $this->children(
|
||||||
|
$Model,
|
||||||
$id,
|
$id,
|
||||||
false,
|
false,
|
||||||
array($primaryKey, $settings['parent'], $settings['level']),
|
array($primaryKey, $settings['parent'], $settings['level']),
|
||||||
|
|
Loading…
Reference in a new issue