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

Breadcrumb

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

function DrupalFinderComposerRuntime::getDrupalRoot

Get the Drupal root path.

File

vendor/webflo/drupal-finder/src/DrupalFinderComposerRuntime.php, line 18

Class

DrupalFinderComposerRuntime

Namespace

DrupalFinder

Code

public function getDrupalRoot() : ?string {
    $core = InstalledVersions::getInstallPath('drupal/core');
    return $core ? realpath(dirname($core)) : null;
}

API Navigation

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