protected static function sortChildElements($array) {
        foreach($array as $i => $item){
            if(isset($item['children']) && is_array($item['children'])){
                uasort($array[$i]['children'], 'self::sortByOrder');
                $array[$i]['children'] = array_values(self::sortChildElements($array[$i]['children']));
            }
        }
        return $array;
    }