system/modules/DocumentManagementSystem/classes/DmsLoader.php
public static function flattenCategories(Array $arrCategories)
  {
    $arrFlattend = array();
    
    foreach ($arrCategories as $category)
    {
      $arrFlattend[] = $category;
      if ($category->hasSubCategories())
      {
        $arrFlattend = array_merge($arrFlattend, \DmsLoader::flattenCategories($category->subCategories));
      }
    }
    
    return $arrFlattend;
  }
public static function flattenCategories(Array $arrCategories)
  {
    $arrFlattend = array();
    
    foreach ($arrCategories as $category)
    {
      $arrFlattend[] = $category;
      if ($category->hasSubCategories())
      {
        $arrFlattend = array_merge($arrFlattend, \DmsLoader::flattenCategories($category->subCategories));
      }
    }
    
    return $arrFlattend;
  }
public static function flattenCategories ( Array $ arrCategories ) { $ arrFlattend = array ( ) ; foreach ( $ arrCategories as $ category ) { $ arrFlattend [ ] = $ category ; if ( $ category -> hasSubCategories ( ) ) { $ arrFlattend = array_merge ( $ arrFlattend , \ DmsLoader :: flattenCategories ( $ category -> subCategories ) ) ; } } return $ arrFlattend ; }
Flatten a categories structure.

@param  arr    $arrCategories  The structured array of categories.
@return  array  Returns the flattened array of categories.
Flatten a categories structure .