src/Dev/Install/InstallEnvironmentAware.php
public function checkModuleExists($dirname)
    {
        // Mysite is base-only and doesn't need _config.php to be counted
        if (in_array($dirname, ['mysite', 'app'])) {
            return file_exists($this->getBaseDir() . $dirname);
        }

        $paths = [
            "vendor/silverstripe/{$dirname}/",
            "{$dirname}/",
        ];
        foreach ($paths as $path) {
            $checks = ['_config', '_config.php'];
            foreach ($checks as $check) {
                if (file_exists($this->getBaseDir() . $path . $check)) {
                    return true;
                }
            }
        }

        return false;
    }
public function checkModuleExists($dirname)
    {
        // Mysite is base-only and doesn't need _config.php to be counted
        if (in_array($dirname, ['mysite', 'app'])) {
            return file_exists($this->getBaseDir() . $dirname);
        }

        $paths = [
            "vendor/silverstripe/{$dirname}/",
            "{$dirname}/",
        ];
        foreach ($paths as $path) {
            $checks = ['_config', '_config.php'];
            foreach ($checks as $check) {
                if (file_exists($this->getBaseDir() . $path . $check)) {
                    return true;
                }
            }
        }

        return false;
    }
public function checkModuleExists ( $ dirname ) { // Mysite is base-only and doesn't need _config.php to be counted if ( in_array ( $ dirname , [ 'mysite' , 'app' ] ) ) { return file_exists ( $ this -> getBaseDir ( ) . $ dirname ) ; } $ paths = [ "vendor/silverstripe/{$dirname}/" , "{$dirname}/" , ] ; foreach ( $ paths as $ path ) { $ checks = [ '_config' , '_config.php' ] ; foreach ( $ checks as $ check ) { if ( file_exists ( $ this -> getBaseDir ( ) . $ path . $ check ) ) { return true ; } } } return false ; }
Check that a module exists

@param string $dirname
@return bool
Check that a module exists