Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 946 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 946 Bytes

Drupal Finder

Travis Packagist

Drupal Finder provides a class to locate a Drupal installation in a given path.

Usage

$drupalFinder = new \DrupalFinder\DrupalFinder();
if ($drupalFinder->locateRoot(getcwd())) {
    $drupalRoot = $drupalFinder->getDrupalRoot();
    $composerRoot = $drupalFinder->getComposerRoot();
    ...
}

Usage on Drupal 7 sites not built with composer

Copy the file d7-no-composer.composer.json to the root of your project. Rename it composer.json. In Terminal, run $ composer install

Examples

License

GPL-2.0+