Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DrupalFinder.php

function DrupalFinder::locateRoot

Locate Drupal, Composer, and vendor directory paths.

Parameters

string $start_path: The path to begin the search from.

Return value

bool True if the Drupal root was identified, false otherwise.

Throws

\Exception

Deprecated

Will be removed in v2. Future usage should instantiate a new DrupalFinder object by passing the starting path to its constructor.

File

vendor/webflo/drupal-finder/src/DrupalFinder.php, line 94

Class

DrupalFinder

Namespace

DrupalFinder

Code

public function locateRoot($start_path) {
    $this->discoverRoots($start_path);
    return !empty($this->getDrupalRoot());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal