ExtensionDiscovery

Discovers available extensions in the filesystem.

To also discover test modules, add

$settings['extension_discovery_scan_tests'] = TRUE;

to your settings.php.

Hierarchy

File

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

Namespace

Drupal\Core\Extension

Members

Name Modifiers Type Description
ExtensionDiscovery::$fileCache protected property The file cache object.
ExtensionDiscovery::$files protected static property Previously discovered files keyed by origin directory and extension type.
ExtensionDiscovery::$infoParser protected property InfoParser instance for parsing .info.yml files.
ExtensionDiscovery::$profileDirectories protected property List of installation profile directories to additionally scan.
ExtensionDiscovery::$root protected property The app root for the current operation.
ExtensionDiscovery::$sitePath protected property The site path.
ExtensionDiscovery::filterByProfileDirectories protected function Filters out extensions not belonging to the scanned installation profiles.
ExtensionDiscovery::getInfoParser protected function Returns a parser for .info.yml files.
ExtensionDiscovery::getProfileDirectories public function Gets the installation profile directories to be scanned.
ExtensionDiscovery::ORIGIN_CORE constant Origin directory weight: Core.
ExtensionDiscovery::ORIGIN_PARENT_SITE constant Origin directory weight: Parent site directory of a test site environment.
ExtensionDiscovery::ORIGIN_PROFILE constant Origin directory weight: Installation profile.
ExtensionDiscovery::ORIGIN_ROOT constant Origin directory weight: Site-wide directory.
ExtensionDiscovery::ORIGIN_SITE constant Origin directory weight: Site-specific directory.
ExtensionDiscovery::ORIGIN_SITES_ALL constant Origin directory weight: sites/all.
ExtensionDiscovery::PHP_FUNCTION_PATTERN constant Regular expression to match PHP function names.
ExtensionDiscovery::process protected function Processes the filtered and sorted list of extensions.
ExtensionDiscovery::scan public function Discovers available extensions of a given type.
ExtensionDiscovery::scanDirectory protected function Recursively scans a base directory for the requested extension type.
ExtensionDiscovery::setProfileDirectories public function Sets explicit profile directories to scan.
ExtensionDiscovery::setProfileDirectoriesFromSettings public function Sets installation profile directories based on current site settings.
ExtensionDiscovery::sort protected function Sorts the discovered extensions.
ExtensionDiscovery::__construct public function Constructs a new ExtensionDiscovery object.
doc_Drupal
2016-10-29 09:09:40
Comments
Leave a Comment

Please login to continue.