public static function findAllChild($folderId, $depth = 0, $currentPosition = 0)
    {
        $result = array();

        if (\is_array($folderId)) {
            foreach ($folderId as $folderSingleId) {
                $result = array_merge($result, (array) self::findAllChild($folderSingleId, $depth, $currentPosition));
            }
        } else {
            $currentPosition++;

            if ($depth == $currentPosition && $depth != 0) {
                return[];
            }

            $categories = self::create()
                ->filterByParent($folderId)
                ->find();

            foreach ($categories as $folder) {
                array_push($result, $folder);
                $result = array_merge($result, (array) self::findAllChild($folder->getId(), $depth, $currentPosition));
            }
        }

        return $result;
    }