generateTreeList

This function is a convenience method for returning a hierarchical array to be used in making HTML select boxes or breadcrumbs.

generateTreeList( &$model, conditions[mixed], keyPath[string], * valuePath[string], spacer[string], recursive[int] )

conditions = null: SQL conditions as a string or as an array (similar to conditions used in the find() model function)

keyPath = null: A string path to the key, for example, {n}.Tag.name valuePath = null: A string path to the value; similar to keyPath spacer = '_': For each level that a node falls under the parent, this character will be placed before the returned list item; for example, the grandchild of the parent node would be returned with two spacers in front of the name recursive = -1:The recursive value for the returned data

0 0

Post a comment

  • Receive news updates via email from this site