function asset_directory_options_recurse in Asset 5.2
Related topics
1 call to asset_directory_options_recurse()
File
- ./
asset.module, line 542 - Main module.
Code
function asset_directory_options_recurse($pid, $children, $prefix = '-') {
$options = array();
if (isset($children[$pid])) {
foreach ($children[$pid] as $dir) {
if ($tree = asset_directory_options_recurse($dir->aid, $children, $prefix . '-')) {
$options[$dir->aid] = $prefix . ' ' . $dir->title;
$options += $tree;
}
else {
$options[$dir->aid] = $prefix . ' ' . $dir->title;
}
}
}
return $options;
}