Skip to content

Commit

Permalink
Tweak doc block wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 2, 2015
1 parent b245cc9 commit be71d48
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions src/ORM/Behavior/TreeBehavior.php
Expand Up @@ -442,44 +442,17 @@ function ($field) {
* the primary key for the table and the values are the display field for the table.
* Values are prefixed to visually indicate relative depth in the tree.
*
* Available options are:
*
* - keyPath: A dot separated path to fetch the field to use for the array key, or a closure to
* return the key out of the provided row.
* - valuePath: A dot separated path to fetch the field to use for the array value, or a closure to
* return the value out of the provided row.
* - spacer: A string to be used as prefix for denoting the depth in the tree for each item
*
* @param \Cake\ORM\Query $query Query.
* @param array $options Array of options as described above.
* @return \Cake\ORM\Query
*/
public function findTreeList(Query $query, array $options)
{
$results = $this->_scope($query)
->find('threaded', [
'parentField' => $this->config('parent'),
'order' => [$this->config('left') => 'ASC']
]);
return $this->formatTreeList($results, $options);
}

/**
* Formats query as a flat list where the keys are
* the primary key for the table and the values are the display field for the table.
* Values are prefixed to visually indicate relative depth in the tree.
* ### Options
*
* Available options are:
*
* - keyPath: A dot separated path to fetch the field to use for the array key, or a closure to
* return the key out of the provided row.
* - valuePath: A dot separated path to fetch the field to use for the array value, or a closure to
* return the value out of the provided row.
* - spacer: A string to be used as prefix for denoting the depth in the tree for each item
* - keyPath: A dot separated path to the field that will be the result array key, or a closure to
* return the key from the provided row.
* - valuePath: A dot separated path to the field that is the array's value, or a closure to
* return the value from the provided row.
* - spacer: A string to be used as prefix for denoting the depth in the tree for each item.
*
* @param \Cake\ORM\Query $query Query.
* @param \Cake\ORM\Query $query The query object to format.
* @param array $options Array of options as described above.
* @return \Cake\ORM\Query
* @return \Cake\ORM\Query Augmented query.
*/
public function formatTreeList(Query $query, array $options = [])
{
Expand Down

0 comments on commit be71d48

Please sign in to comment.