コード例 #1
0
 /**
  * cleans up and reorganises data in nested array where keys are structure_id
  * @param $pParamHash contains a nested set of arrays with structure_id as key
  * @return reorganised array
  */
 function embellishStructureHash(&$pParamHash)
 {
     $pos = 1;
     foreach ($pParamHash as $structure_id => $node) {
         if (!empty($node)) {
             LibertyStructure::embellishStructureHash($node);
         }
         $node['pos'] = $pos++;
         $node['structure_id'] = $structure_id;
         $pParamHash[$structure_id] = $node;
     }
 }