From 0524eb95aeedbe0fa8e35b4b5fec0f71f8cb786a Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Mon, 1 Jun 2015 16:14:15 +0200 Subject: [PATCH] Documentation update --- lib/Cake/Model/Behavior/TreeBehavior.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index c4aa95a8ef1..a19d4a8fe6f 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -459,12 +459,15 @@ public function generateTreeList(Model $Model, $conditions = null, $keyPath = nu * Note that when using your own find() call this expects the order to be "left" field asc in order * to generate the same result as using generateTreeList() directly. * + * Options: + * + * - 'keyPath': A string path to the key, i.e. "{n}.Post.id" + * - 'valuePath': A string path to the value, i.e. "{n}.Post.title" + * - 'spacer': The character or characters which will be repeated + * * @param Model $Model Model using this behavior * @param array $results Result array of a find() call * @param array $options Options - * @param null $keyPath A string path to the key, i.e. "{n}.Post.id" - * @param null $valuePath A string path to the value, i.e. "{n}.Post.title" - * @param string $spacer The character or characters which will be repeated * @return array An associative array of records, where the id is the key, and the display field is the value */ public function formatTreeList(Model $Model, array $results, array $options = array()) {