public static function getHomeRoute()
    {
        if (empty(self::$home_route)) {
            $grav = Grav::instance();

            /** @var Config $config */
            $config = $grav['config'];

            /** @var Language $language */
            $language = $grav['language'];

            $home = $config->get('system.home.alias');

            if ($language->enabled()) {
                $home_aliases = $config->get('system.home.aliases');
                if ($home_aliases) {
                    $active = $language->getActive();
                    $default = $language->getDefault();

                    try {
                        if ($active) {
                            $home = $home_aliases[$active];
                        } else {
                            $home = $home_aliases[$default];
                        }
                    } catch (ErrorException $e) {
                        $home = $home_aliases[$default];
                    }

                }
            }

            self::$home_route = trim($home, '/');
        }

        return self::$home_route;
    }
public static function getHomeRoute()
    {
        if (empty(self::$home_route)) {
            $grav = Grav::instance();

            /** @var Config $config */
            $config = $grav['config'];

            /** @var Language $language */
            $language = $grav['language'];

            $home = $config->get('system.home.alias');

            if ($language->enabled()) {
                $home_aliases = $config->get('system.home.aliases');
                if ($home_aliases) {
                    $active = $language->getActive();
                    $default = $language->getDefault();

                    try {
                        if ($active) {
                            $home = $home_aliases[$active];
                        } else {
                            $home = $home_aliases[$default];
                        }
                    } catch (ErrorException $e) {
                        $home = $home_aliases[$default];
                    }

                }
            }

            self::$home_route = trim($home, '/');
        }

        return self::$home_route;
    }
public static function getHomeRoute ( ) { if ( empty ( self :: $ home_route ) ) { $ grav = Grav :: instance ( ) ; /** @var Config $config */ $ config = $ grav [ 'config' ] ; /** @var Language $language */ $ language = $ grav [ 'language' ] ; $ home = $ config -> get ( 'system.home.alias' ) ; if ( $ language -> enabled ( ) ) { $ home_aliases = $ config -> get ( 'system.home.aliases' ) ; if ( $ home_aliases ) { $ active = $ language -> getActive ( ) ; $ default = $ language -> getDefault ( ) ; try { if ( $ active ) { $ home = $ home_aliases [ $ active ] ; } else { $ home = $ home_aliases [ $ default ] ; } } catch ( ErrorException $ e ) { $ home = $ home_aliases [ $ default ] ; } } } self :: $ home_route = trim ( $ home , '/' ) ; } return self :: $ home_route ; }
Gets the home route

@return string
Gets the home route