Contao\Environment::path PHP Method

path() protected static method

Return the relative path to the base directory (e.g. /path)
protected static path ( ) : string
return string The relative path to the installation
    protected static function path()
    {
        $request = \System::getContainer()->get('request_stack')->getCurrentRequest();
        if ($request === null) {
            return '';
        }
        return $request->getBasePath();
    }