From 932a591a644a48dcdbb000843de83273d795ad5e Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 23 Feb 2014 12:28:38 +0100 Subject: [PATCH] Adding the new TreeBehavior file --- src/Model/Behavior/TreeBehavior.php | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/Model/Behavior/TreeBehavior.php diff --git a/src/Model/Behavior/TreeBehavior.php b/src/Model/Behavior/TreeBehavior.php new file mode 100644 index 00000000000..dd2d1b696bd --- /dev/null +++ b/src/Model/Behavior/TreeBehavior.php @@ -0,0 +1,64 @@ + 'parent_id', + 'left' => 'lft', + 'right' => 'rght', + 'scope' => null + ]; + +/** + * Constructor + * + * @param Table $table The table this behavior is attached to. + * @param array $config The config for this behavior. + */ + public function __construct(Table $table, array $config = []) { + parent::__construct($table, $config); + $this->_table = $table; + } + + public function beforeSave(Event $event, $entity) { + $config = $this->config(); + + } + +}