private function recursiveTreeStrip(array $data)
    {
        if (count($data) === 1 && !empty($data[0]['children'])) {
            return $this->recursiveTreeStrip($data[0]['children']);
        }

        return $data;
    }
private function recursiveTreeStrip(array $data)
    {
        if (count($data) === 1 && !empty($data[0]['children'])) {
            return $this->recursiveTreeStrip($data[0]['children']);
        }

        return $data;
    }
private function recursiveTreeStrip ( array $ data ) { if ( count ( $ data ) === 1 && ! empty ( $ data [ 0 ] [ 'children' ] ) ) { return $ this -> recursiveTreeStrip ( $ data [ 0 ] [ 'children' ] ) ; } return $ data ; }
Strip all disabled nodes recursivly.

@param array $data

@return array
Strip all disabled nodes recursivly .