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

Breadcrumb

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

function ExtensionDiscovery::__construct

Same name in this branch
  1. 11.1.x vendor/mglaman/phpstan-drupal/src/Drupal/ExtensionDiscovery.php \mglaman\PHPStanDrupal\Drupal\ExtensionDiscovery::__construct()

Constructs a new ExtensionDiscovery object.

Parameters

string $root: The app root.

bool $use_file_cache: Whether file cache should be used.

string[] $profile_directories: The available profile directories

string $site_path: The path to the site.

File

core/lib/Drupal/Core/Extension/ExtensionDiscovery.php, line 106

Class

ExtensionDiscovery
Discovers available extensions in the filesystem.

Namespace

Drupal\Core\Extension

Code

public function __construct(string $root, $use_file_cache = TRUE, ?array $profile_directories = NULL, ?string $site_path = NULL) {
    $this->root = $root;
    $this->fileCache = $use_file_cache ? FileCacheFactory::get('extension_discovery') : NULL;
    $this->profileDirectories = $profile_directories;
    $this->sitePath = $site_path;
}

API Navigation

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