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
|
||||
*/
|
||||
protected function _setChildrenLevel(Model $Model, $id) {
|
||||
$settings = $Model->Behaviors->Tree->settings[$Model->alias];
|
||||
$settings = $this->settings[$Model->alias];
|
||||
$primaryKey = $Model->primaryKey;
|
||||
$depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]);
|
||||
|
||||
$children = $Model->children(
|
||||
$children = $this->children(
|
||||
$Model,
|
||||
$id,
|
||||
false,
|
||||
array($primaryKey, $settings['parent'], $settings['level']),
|
||||
|
|
Loading…
Reference in a new issue