From fbf5330fd81fcc94784f354f0988f3888df31b3c Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 25 Dec 2007 09:00:05 +0000 Subject: [PATCH] Adding TreeBehavior::setScope(), fixes #3232 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6252 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/behaviors/tree.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cake/libs/model/behaviors/tree.php b/cake/libs/model/behaviors/tree.php index b7c003460..9c766e2e2 100644 --- a/cake/libs/model/behaviors/tree.php +++ b/cake/libs/model/behaviors/tree.php @@ -54,6 +54,15 @@ class TreeBehavior extends ModelBehavior { }*/ $this->settings[$model->alias] = $settings; } +/** + * Change the Tree behavior on the fly + * + * @param object $model + * @param mixed $scope + */ + function setScope(&$model, $scope) { + $this->settings[$model->name]['scope'] = $scope; + } /** * After save method. Called after all saves *