Add Group to breadcrumb
@param GroupChecker $groupChecker
@param string       $firstLabel
@param string       $route
@param array|null   $routeArgs
197776
public function addGroup(
        GroupChecker $groupChecker,
        $firstLabel = null,
        $route = null,
        array $routeArgs = null
    ) {
        $routeArgs = (array) $routeArgs;
        if (empty($route)) {
            $base = Base::instance();
            $routeArgs = ($base['PARAMS'] ?: []) + ($base['GET'] ?: []);
            $route = $base['ALIAS'];
            unset($routeArgs[0]);
        }

        $i = 0;
        foreach ($groupChecker->getGroups() as $label => $group) {
            if ($i === 0 && $firstLabel) {
                $label = $firstLabel;
            }

            $this->add($route, ['group' => $group] + $routeArgs, $label);
            $i++;

            if ($groupChecker->isEqual($group)) {
                break;
            }
        }

        return $this;
    }
848223
public function createRoute(Group $group, $name, array $parameters)
	{
		return $this->create('route', array($group, $name, $parameters));
	}
1002610
private void categories(RouteMeta routeMete) {
        if (routeVerify(routeMete)) {
            logger.info(">>> Start categories, group = " + routeMete.getGroup() + ", path = " + routeMete.getPath() + " <<<");
            Set<RouteMeta> routeMetas = groupMap.get(routeMete.getGroup());
            if (CollectionUtils.isEmpty(routeMetas)) {
                Set<RouteMeta> routeMetaSet = new TreeSet<>(new Comparator<RouteMeta>() {
                    @Override
                    public int compare(RouteMeta r1, RouteMeta r2) {
                        try {
                            return r1.getPath().compareTo(r2.getPath());
                        } catch (NullPointerException npe) {
                            logger.error(npe.getMessage());
                            return 0;
                        }
                    }
                });
                routeMetaSet.add(routeMete);
                groupMap.put(routeMete.getGroup(), routeMetaSet);
            } else {
                routeMetas.add(routeMete);
            }
        } else {
            logger.warning(">>> Route meta verify error, group is " + routeMete.getGroup() + " <<<");
        }
    }
150492
protected void addAccountsGroupRules(Digester digester, String xpath) {

        String xp_group = xpath + N_GROUPS + "/" + N_GROUP;
        digester.addCallMethod(xp_group, "importGroup");
        xp_group += "/";
        digester.addCallMethod(xp_group + N_NAME, "setGroupName", 0);
        digester.addCallMethod(xp_group + N_DESCRIPTION, "setGroupDescription", 0);
        digester.addCallMethod(xp_group + N_FLAGS, "setGroupFlags", 0);
        digester.addCallMethod(xp_group + N_PARENTGROUP, "setGroupParent", 0);
    }
214314
public function group()
    {
        // Get arguments
        if (func_num_args() === 2) {
            list($prefix, $routes) = func_get_args();
            $filter = null;
        } elseif (func_num_args() === 3) {
            list($filter, $prefix, $routes) = func_get_args();
        }

        // Add leading slash to prefix if not present
        if (strncmp($prefix, '/', 1) !== 0) {
            $prefix = '/' . $prefix;
        }

        // Add trailing slash to prefix if not present
        if (substr($prefix, -1) !== '/') {
            $prefix .= '/';
        }

        // Register routes
        foreach ($routes as $route) {
            $type = $route[0];
            if ($type === 'resource') {
                $this->resource($prefix . $route[1], $route[2], $filter);
            } else {
                $this->register($type, $prefix . $route[1], $route[2], $filter);
            }
        }
    }
589548
public function setRoot($route, array $args = null, $label = null)
    {
        array_unshift($this->hierarchy, [
            'label' => $label ?: static::titleIze($route),
            'route' => $route,
            'args' => (array) $args
        ]);
        $this->lastKey = null;

        return $this;
    }
449769
protected function setBreadcrumbEditCategoryGroup()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'url' => $this->url('admin/content/category-group'),
            'text' => $this->text('Category groups')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
1154666
public function addRoute($method, $route, $callback)
    {
        return $this->routes[] = new Route(strtoupper($method), $route, $callback);
    }
153245
protected function createRoute(GroupInterface $group, string $method, string $uriPath, callable $handler): Route
    {
        $route = (new Route($group, $method, $uriPath, $handler));

        return $route;
    }
887874
public function group($name, $route, array $option = [], array $pattern = [])
    {
        if (is_array($name)) {
            $option = $name;
            $name = isset($option['name']) ? $option['name'] : '';
        }

        return (new RuleGroup($this, $this->group, $name, $route, $option, $pattern))
            ->lazy($this->lazy)
            ->mergeRuleRegex($this->mergeRuleRegex);
    }
1104746
public function miss($route, $method = '*', array $option = [])
    {
        return $this->group->addMissRule($route, $method, $option);
    }
1262465
protected function add_missing_sub($grouped, $path, $tags) {

        // Remember tag being processed
        $processedtag = basename($path);

        $info =& $this->currentdata[$grouped]['tags'];
        $hierarchyarr = explode('/', str_replace($grouped . '/', '', $path));

        $previouselement = '';
        $currentpath = '';

        foreach ($hierarchyarr as $index => $element) {

            $currentpath = $currentpath . '/' . $element;

            // If element is already set and it's not
            // the processed one (with tags) fast move the $info
            // pointer and continue
            if ($element !== $processedtag && isset($info[$element])) {
                $previouselement = $element;
                $info =& $info[$element];
                continue;
            }

            // If previous element already has occurrences
            // we move $info pointer there (only if last is
            // numeric occurrence)
            if (!empty($previouselement) && is_array($info) && count($info) > 0) {
                end($info);
                $key = key($info);
                if ((int) $key === $key) {
                    $info =& $info[$key];
                }
            }

            // Create element if not defined
            if (!isset($info[$element])) {
                // First into last element if present
                $info[$element] = array();
            }

            // If element is the current one, add information
            if ($element === $processedtag) {
                $info[$element][] = $tags;
            }

            $previouselement = $element;
            $info =& $info[$element];
        }
    }
986996
private function addGroup(Group $group, array $names = [], array $match = []) : array
    {
        $return = [];
        if ($group->getName()) {
            $names[] = $group->getName();
        }
        if ($group->getMatch()) {
            $match[] = $group->getMatch();
        }

        /** @var Route|Group|string $route */
        foreach ($group->getRoutes() as $name => $route) {
            $routeName = $names;
            $routeMatch = $match;

            if (is_string($route) || $route instanceof Route) {
                if (is_string($route)) {
                    $route = (new Route($route))
                        ->setName($name);
                } elseif ($name) {
                    $route->setName($name);
                }

                if ($route->getMatch()) {
                    $routeMatch[] = $route->getMatch();
                }

                if ($route->getName()) {
                    $routeName[] = $route->getName();
                }

                $route
                    ->setName(implode('/', $routeName))
                    ->setMatch('/' . implode('/', $routeMatch))
                ;

                $route->addGroupConfiguration($group);

                $return[$route->getName()] = $route;
            } elseif ($route instanceof Group) {
                $route->addGroupConfiguration($group);

                $return = array_merge(
                    $return,
                    $this->addGroup($route, $names, $match)
                );
            } else {
                throw new \InvalidArgumentException(sprintf("Invalid route type '%s'", gettype($route)));
            }
        }

        return $return;
    }
1234339
public function addRoute(string $method, string $route, ...$callback)
    {
        $method = strtolower($method);
        $route = ltrim($route, '/');
        $group = rtrim($this->group, '/') . '/';
        $route = $group . $route;
        $scope = $this->middleware->count();
        $this->layer[$method][] = new Route(
            $method,
            $route,
            $callback,
            $scope,
            $this->group
        );

        return true;
    }
1062085
public function addRoute(Route $route, array $parameterIndexNameMap)
    {
        if ($route->allowsAnyHttpMethod()) {
            $this->defaultRouteData = MatchedRouteData::from($parameterIndexNameMap, $route);
        } else {
            $this->httpMethodRouteDataMap[] = [$route->getHttpMethods(), MatchedRouteData::from($parameterIndexNameMap, $route)];
        }
    }
627376
public static function group($route, $callback, $options = [])
    {
        app()->router->group($route, $callback, $options);
    }
433470
public static function configureRoutes(GroupInterface $routes): void
    {
        $routes->group('', function (GroupInterface $routes): void {

            $routes->addContainerConfigurators([
                L10nContainerConfigurator::CONFIGURATOR,
            ]);

            for ($i = 0; $i < 10 + 10 * 5; ++$i) {
                $routes->post("/posts$i/create", [PostsController::class, PostsController::METHOD_CREATE]);
            }

        });
    }