PHP Class Sulu\Component\Content\Query\ListToTreeConverter

显示文件 Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( boolean $moveUp = false ) ListToTreeConverter constructor.
convert ( array $data ) : array generate a tree of the given data with the path property.

Private Methods

Method Description
explodeTree ( array $array, string $delimiter = '_', boolean $baseval = false ) : array Explode any single-dimensional array into a full blown tree structure, based on the delimiters found in it's keys.
toArray ( $tree )

Method Details

__construct() public method

ListToTreeConverter constructor.
public __construct ( boolean $moveUp = false )
$moveUp boolean

convert() public method

generate a tree of the given data with the path property.
public convert ( array $data ) : array
$data array
return array